Russia
|
Multilingual Discuz!ML can use multiple languages, selectable by a user.
But by default there is only 2 default languages - SC and TC (included into the product package).
How to add a new language into your international Discuz!ML:
1) Get any interesting for you language pack from Discuz Addon Center:
http://addon.discuz.com/?@55352.developer
sc = Simplified Chinese (简体中文)
tc = Traditional Chinese (繁體中文)
en = English (English)
fr = French (Français)
de = German (Deutsch)
pl = Polish (Polski)
ru = Russian (Русский)
es = Spanish (Español)
tr = Turkish (Türkçe)
kr = Korean (한국어)
la = Lao (ພາສາລາວ)
th = Thai (ไทย)
vn = Vietnamese (Tiếng Việt)
ar = Arabic (العربية)
fa = Farsi (Persian فارسی)
ui = Uighur
... etc.
1A) If you are a registered language developer then you can get your language pack from our language repository.
1B) If there is no language you want in the addon center or in our repository, then you can create your new language pack by duplicating English language pack. Just copy the folder /source/language/en into /source/language/xx, where "xx" is a code of your new language, i.e. "vn" for Vietnamese language.
2) Upload just downloaded language pack into the /source/language/ directory at your site.
For example, for use Vietnamese language pack copy it into /source/language/vn/ directory.
3) Open for Editing your configuration file /config/config_global_default.php:
Find these lines:
- //-----------------------------------------------------------------------
- // Multi-Lingual support by Valery Votintsev
- //-----------------------------------------------------------------------
- // "icon" - flag image file name;
- // "name" - language name in NATIONAL language;
- // "title" - language name in ENGLISH language;
- // "dir" - text direction:
- // 'ltr' (Left To Right)
- // 'rtl' (Right To Left), i.e for Arabic, Hebrew, Urdu, etc.
- //-----------------------------------------------------------------------
- // Uncomment a language line for enable the language!
- // Comment a language line that is not required!!!
- //
- // Enabled Language List:
- $_config['languages'] = array(
- // 'ar' => array('icon'=>'ar.gif', 'name'=>'العربية', 'title'=>'Arabic', 'dir'=>'rtl'),
- 'sc' => array('icon'=>'zh.gif', 'name'=>'简体中文', 'title'=>'Simplified Chinese', 'dir'=>'ltr'),
- 'tc' => array('icon'=>'tw.gif', 'name'=>'繁體中文', 'title'=>'Traditional Chinese', 'dir'=>'ltr'),
- // 'de' => array('icon'=>'de.gif', 'name'=>'Deutsch', 'title'=>'Deutsch', 'dir'=>'ltr'),
- // 'en' => array('icon'=>'en.gif', 'name'=>'English', 'title'=>'English', 'dir'=>'ltr'),
- // 'es' => array('icon'=>'es.gif', 'name'=>'Español', 'title'=>'Spanish', 'dir'=>'ltr'),
- // 'fr' => array('icon'=>'fr.gif', 'name'=>'Français', 'title'=>'French', 'dir'=>'ltr'),
- // 'ru' => array('icon'=>'ru.gif', 'name'=>'Русский', 'title'=>'Russian', 'dir'=>'ltr'),
- // 'th' => array('icon'=>'th.gif', 'name'=>'ภาษาไทย', 'title'=>'Thai', 'dir'=>'ltr'),
- // 'tr' => array('icon'=>'tr.gif', 'name'=>'Türkçe', 'title'=>'Turkish', 'dir'=>'ltr'),
- // 'vn' => array('icon'=>'vn.gif', 'name'=>'Tiếng Việt', 'title'=>'Vietnamese', 'dir'=>'ltr'),
- );
Copy the Code
4) Uncomment (or add) the line you need (for example, the 'vn' line):
- 'vn' => array('icon'=>'vn.gif', 'name'=>'Tiếng Việt', 'title'=>'Vietnamese', 'dir'=>'ltr'),
Copy the Code
5) Edit your configuration file /config/config_global.php:
Find this lines:
- // ------------------------- CONFIG LANGUAGES ------------------------- //
- $_config['languages']['sc']['icon'] = 'zh.gif';
- $_config['languages']['sc']['name'] = '简体中文';
- $_config['languages']['sc']['title'] = 'Simplified Chinese';
- $_config['languages']['sc']['dir'] = 'ltr';
- $_config['languages']['sc']['code'] = 'zh-CN';
- $_config['languages']['tc']['icon'] = 'tw.gif';
- $_config['languages']['tc']['name'] = '繁體中文';
- $_config['languages']['tc']['title'] = 'Traditional Chinese';
- $_config['languages']['tc']['dir'] = 'ltr';
- $_config['languages']['tc']['code'] = 'zh-TW';
Copy the Code
6) Add 4 lines for your new language pack i.e. vn:
- $_config['languages']['vn']['icon'] = 'vn.gif';
- $_config['languages']['vn']['name'] = 'Tiếng Việt';
- $_config['languages']['vn']['title'] = 'Vietnamese';
- $_config['languages']['vn']['dir'] = 'ltr';
- $_config['languages']['vn']['code'] = 'vi-VN';
Copy the Code
7) Go to your AdminCP and clean all the caches:
Admin-Center -> Tools -> Update Cache
8) That's all!
How to remove allready installed language pack:
1) Edit your configuration file /config/config_global.php:
Find and comment (or remove) lines for the removed language, i.e. "vn":
- // $_config['languages']['vn']['name'] = 'Tiếng Việt';
- // $_config['languages']['vn']['title'] = 'Vietnamese';
- // $_config['languages']['vn']['dir'] = 'ltr';
- // $_config['languages']['vn']['code'] = 'vi-VN';
Copy the Code
2) Go to your Admin-Center -> Tools -> Update Cache
and clean all the caches.
3) Optionally you can totally remove the obsolete language pack files.
For example, remove the /source/language/vn/ directory.
4) That's all!
How to create a NEW language pack for multilingual Discuz!ML:
1) Create a new subfolder under the /source/language/ directory for your new language and copy all the content from any existing language pack into this directory.
For example, for create the Vietnamese language pack make the /source/language/vn/ directory.
2) Create a flag icon for your language with a size of 16x16px ( i.e. vn.gif ) and copy the icon into the language subfolder (i.e. into 'source/language/vn' folder).
3) Edit your configuration file /config/config_global.php:
Find this lines:
- // ------------------------- CONFIG LANGUAGES ------------------------- //
- $_config['languages']['sc']['icon'] = 'zh.gif';
- $_config['languages']['sc']['name'] = '简体中文';
- $_config['languages']['sc']['title'] = 'Simplified Chinese';
- $_config['languages']['sc']['dir'] = 'ltr';
- $_config['languages']['sc']['code'] = 'zh-CN';
- $_config['languages']['tc']['icon'] = 'tw.gif';
- $_config['languages']['tc']['name'] = '繁體中文';
- $_config['languages']['tc']['title'] = 'Traditional Chinese';
- $_config['languages']['tc']['dir'] = 'ltr';
- $_config['languages']['tc']['code'] = 'zh-TW';
Copy the Code
4) Add 4 new lines for your new language pack i.e. vn:
- $_config['languages']['vn']['icon'] = 'vn.gif';
- $_config['languages']['vn']['name'] = 'Tiếng Việt';
- $_config['languages']['vn']['title'] = 'Vietnamese';
- $_config['languages']['vn']['dir'] = 'ltr';
- $_config['languages']['vn']['code'] = 'vi-VN';
Copy the Code
5) Go to your Admin-Center -> Tools -> Update Cache
and clean all the caches.
6) That's all! The language pack is turned on!
7) It is a time for a hard job!!!
Go to your language pack folder and translate ALL the files line by line.
Important! DO NOT REORDER EXISTING LINES!!!
8) For see a result of your translation, just update the cache from your Admin-Center!
9) Are you finished? Great!
Let you suggest your hard job for our community members!!!
Just compress your language pack folder and attach the archive at this forum,
or upload it to any file-upload server!
How to change the language order in "select language" menu:
Just reorder language lines as you wish in gonfig_global.php !
|
|