Translations / MultilanguageWhen you develop a extension and this extension should be translatable, then you have following possibilities to do this. Best practice is, that all templates and outputs in your extensions should be translatable.
After defining the output as translatable you can translate it yourself in the extension editor or the user can (overwrite) translate in the language window (Butterfly -> Language). In both ways the system crawls all template files (.tpl), javascript files (.js) and php files (.php) and search for the directives.
Please note: When you make your templates translatable, then use please the english words in the templates and translate always from english to the target language. English is a very widespread speaking language, so more peoples can translate your templates.
The translated values are stored in following file
inc/modules/<extensionKey>/lang/<languageKey>.json
To make your templates translatable use following methods.
Templates filesIn templates you should surround each phrase with [[ and ]]. Example for a multilanguage templates
PHP filesIn php files you should use the global function _l().
Example of a multilanguage php file
Javascript filesIn javascript files you should use the global function _(). Example of a multilanguage php file
You can manage the translations with the following windows.
|
What is Kryn.cms ?
Administrator
Developer
|
