Translations
From ReOS Documentation Wiki
ReOS includes a translation menu option "Application Labels" to translate/change any application label.
Contents |
How to change an existing translation
Go to Administration Area, go to menu Administration->Application Labels and Administration->List of values. You can change any of the application labels and after you must "Install language changes". In order to create new php language files, all files in folder /padmin/langs must be writable.
How to Create a new language
edit file /padmin/sqls/create_lang.sql and change xx by your new language code and prefix_ by you table prefix (Usually tb_)
/** * Creates new language * Must replace table prefix and xx by new language code. * Version : Until ReOS 2.0.5 */ INSERT INTO prefix_labels (id_name, cod_lang, txt_label) SELECT id_name, 'xx', txt_label FROM prefix_labels WHERE cod_lang = 'en'; UPDATE prefix_labels SET txt_label = 'xx' WHERE id_name = '_IDIOMA' AND cod_lang = 'xx'; INSERT INTO prefix_lists (id_name, txt_code, cod_lang, num_order, txt_value) SELECT id_name, txt_code, 'xx', num_order, txt_value FROM prefix_lists WHERE cod_lang = 'en'; /** * Following is optional. Only if you want to identify new labels and lists by concat ## before all labels */ UPDATE prefix_labels SET txt_label = concat('##',txt_label) WHERE (id_name <> '_CHARSET' AND id_name <> '_DATETIME_SQL' AND id_name <> '_DATE_SQL' AND id_name <> '_IDIOMA' AND id_name <> '_DATE_FORMAT') AND cod_lang = 'xx'; UPDATE prefix_lists SET txt_value = concat('##',txt_value) WHERE cod_lang = 'xx';
Change "xx" by your language code and change "prefix" by your database table prefix. Execute it !
Follow next steps depending on ReOS version.
Only until ReOS v2.0.4 :
Open file /tpl/config.php and to line :
$lst_idiomas= array ("en"=>"English", "es"=>"Spanish");
add you language code as follow :
$lst_idiomas= array ("en"=>"English", "es"=>"Spanish", "xx"=>"Your language name");
Then if you open admin site, you will see your new language list.
For ReOS 2.0.5 and above :
Login into Administation->App.Variables
Edit variable _ACTIVE_LANGS, if you have : en = English, es = Spanish
and you want to add new one as follow : en = English, es = Spanish, xx = new_language_name
Then your ready to translate.
In Administration Area, go to menu Administration->Application Labels and you will find your new language. In order to create new php language files, all files in folder /padmin/langs must be writable.
Undo Mistakes when updating languages
When "Install Language Changes", ReOS can stop working because of a mistake generating language files. if you manage to make a mistak when updating a language file, you can go back from the ftp and access the language file by going to /padmin/langs/lang_en_adm.php and in there you can find the list of all you language files, simply revert back the change and run the "Install language changes" from padmin. This should get you out of troble if you have made the wrong change.
Translating from Admin Site
After a new language is set up, you have to translate "Application Labels" and "List of values", both in administration menu. In order to create new php language files, all files in folder /padmin/langs must be writable.
Theme Language files
Each theme in folder /tpl/<theme_name> has its own language files that add some new translations. You can only translate them by editing php file in folder /tpl/<theme_name>/langs
