- Products
- Purchase
Order Online Maintenance Renewal Resellers - Support
Helpdesk Online Documentation Web Forum - Our Clients
- About
About us Services Contact
From AfterLogic Wiki
1. Make sure the text editor you use supports UTF-8 because all text in WebMail Pro language files is in UTF-8 charset. It's very important to use a text editor in UTF-8 mode because otherwise some characters might be displayed incorrectly for those users which have another language set as default system language. You can use standard Windows Notepad because it supports UTF-8.
2. Open webmailphp\web\lang\[language].php, where [language]=Spanish is for Spanish destination language (e.g. Spanish.php). Add declaration of a new language constant:
define('NewConstant', 'new constant');
This should be added to all [language].php files which are used in WebMail. For instance, if you don’t add the constant to English.php, this will cause an error when English interface language is selected.
3. Open \libraries\afterlogic\common\managers\webmail\classes\jslang-webmail-map.php file and add the constant you’ve created:
'NewConstant ' => NewConstant ,
right after the line:
'TestButton' => TestButton
4. Now you can use the constant in JavaScript files:
Lang.NewConstant
5. This final step is an optional one - when you log into WebMail next time, the value will be set to one matching language selected. To make sure it is updated upon changing language, the constant must be registered in object responsible for changing language. For instance:
eLink.innerHTML = Lang.NewConstant; WebMail.langChanger.register('innerHTML', eLink, 'NewConstant', '');
Parameters of WebMail.langChanger.register function:
1. HTML element property the constant value is assigned to. innerHTML, value and title are supported values.
2. HTML element which should have its property assigned.
3. Language constant name, in quotes.
4. Text appended to language constant value. For instance, headers might need semicolon appended.
Last edit: 2011/7/19