Login +

Langs / Mechanism

Langs layer is divided between various application packages to organize the different translation files following a certain functional logic.

The organization of these files is very similar to Controllers / Actions and Views Body / Headers.

To minimize the inclusion of files, there are three possibilities for placement of the translations.

The tree is as follows:

The translations contained in the generic file (site.xx.lang.php) are loaded on the entire site.

Those contained in the Controller folder and prefixed by "__"(__Controller.xx.lang.php) are loaded on the entire Controller.

Finally those corresponding to the action are of course only loaded on the current action.

Translation files, written in PHP, adopt the following convention:

* EN File for the action Index into Blog Controller
* You can create all your sentences variables here. To create it, follow the exemple :
* ||t||Access it with JS and XSL variable : $GLOBALS[$GLOBALS['PROJECT_NAME']]['JS']['KEY_OF_YOUR_VARIABLE'] = "value of your sentence in EN";
* ||t||Access it with XSL variable only   : $GLOBALS[$GLOBALS['PROJECT_NAME']]['XSL']['KEY_OF_YOUR_VARIABLE'] = "value of your sentence in EN";
* ||t||You can customise the value 'KEY_OF_YOUR_VARIABLE' and "value of your sentence in EN" 
* @author SillySmart
* @copyright SillySmart
* @package Langs.Actions.Blog
* @since 1.0


The variables shown under the key "JS" will be available in XSL and JavaScript. Those indicated under the key "XSL" will be only in XSL.

Related :