Multi-Language Support
Modules can support multiple languages should you wish.
For this, the addon module needs a lang subfolder created within it. Within that, language files can be created matching the names of the main WHASOLS admin area language files. The admin language files are located in the /admin/lang/ folder.
WHASOLS has the language variables for custom modules separate to make installation and updating easier.
If language files exist, WHASOLS will then load these whenever the custom module is accessed. WHASOLS will select the appropriate language file based on the current administrators language setting. If no matching language file exists within the module folder, it will fall back to the default language set in the module’s config array.
A language file would be located at
/modules/addons/youraddonname/lang/english.php
Language File:
Here is a sample client area function demonstrating all the available return variables:
<?php
$_ADDONLANG['intro'] = "Module Introduction here";
$_ADDONLANG['description'] = "Module description here";
$_ADDONLANG['documentation'] = "Module Documentation here";
_output
functions array using “_lang”
.
Below is a demonstration of how you specify the default language for your module in the config array.