HOW TO change/add a new language

Talk and info about common issues and learn how to do almost anything with ApPHP AdminPanel

Moderators: ne_moj, zewa, vadimako, ne_moj, zewa, vadimako

administrator
Site Admin
Site Admin
Posts: 5976
Joined: Jan 7th, '09, 23:18
Contact:

HOW TO change/add a new language

Postby administrator » Oct 9th, '09, 17:34

1. If you want to set a default language, you have to perform following steps:
Go to General -> Panel Settings
find there Site Language row, click on [Edit], change the language from dropdown list and then click on Update at the bottom of the page.
panel_settings.png
panel_settings.png (10.57 KiB) Viewed 1126 times


2. Changing preferred language is a very simple process.
Go to Accounts Manager -> My Account
find there Language row, change the language from dropdown list and then click on Update at the bottom of the page.
change_preferred_lang.png
change_preferred_lang.png (8.28 KiB) Viewed 1126 times


3. Adding new language is a very simple and straight process.
3.1. Open modules\languages folder and create there new file, call it zz.php, where
"zz" is the abbreviation of your language (you can also clone en.php file)

3.2. Translate all constants in this file into your language, use html codes for special symbols if you need.
For example:
á
Á

3.3. Open install\config.tpl file (or your existing config file) and add new language in array of languages;
$fill_from_array_languages = array(
"ar"=>"Arabic",
"bg"=>"Bulgarian",
.......
"zz"=>"My New Language",

3.4. Add new language to DataGrid module if you need it.
3.5. Add new language to Calendar module if you need it.

Return to “ApPHP AdminPanel {HOW TO}”