AlegroCart open source E-commerce
Web hosting by Host1Plus

Create a New Language Pack

knowledge base and frequently asked questions

Create a New Language Pack

Postby Brent » Tue Apr 13, 2010 5:14 am

How to Create a language pack
Using "german" language as my example

STEP 1: Make copies of the original language file structure
ORIGINAL:
catalog/language/english
admin/language/english
COPY:
catalog/language/german
admin/language/german

Inside your new folder, eg: german, rename the file english.php to german.php

STEP 2: Change all the values within the new copy files to the translated language.
For example, english.php has:
Code:
.....
// Button
$_['button_list'] = 'List';
$_['button_insert'] = 'Insert';
$_['button_update'] = 'Update';
$_['button_delete'] = 'Delete';
$_['button_save'] = 'Save';
.....
In the german.php file it would be:
Code:
.....
// Buttons
$_['button_list'] = 'Liste';
$_['button_insert'] = 'Einfügen';
$_['button_update'] = 'Aktualisieren';
$_['button_delete'] = 'Löschen';
$_['button_save'] = 'Speichern';
.....

Do that for all the language files.
Be aware when you see %s . This is a place holder for test to be inserted.
$_['text_results'] = 'Results %s - %s of %s';
This would be:
$_['text_results'] = 'Ergebnisse %s - %s von %s';


STEP 3: include a famfamfam icon flag for the matching country. Name it xx.png (match the language code) into the catalog/styles/image folder
Example for german language: de.png in the catalog\styles\image folder
http://www.famfamfam.com/lab/icons/flags/

STEP 4: Insert the new language code in admin.
Language Name: German
Code: de
Flag Image: de.png
Directory: german
Main Filename: german.php
Sort Order: 2

Many codes are listed in library/language/language.php
Also/ for more, see: http://msdn.microsoft.com/en-us/library ... 85%29.aspx

But you should be sure that for each language you install, that you also update all the locations that will refer to that language when selected.
- All categories need to be edited to get the name and description translations.
- All products need to be edited to get the name and description translations.

You will have to add the translations to the following sections:
- Default Order Statuses
- Default Payment Modules
- Default Shipping Modules
User avatar
Brent
Site Admin
 
Posts: 4239
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Return to FAQ / Layouts / Knowledge Base

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 2 guests

cron