2016-04-15, 19:39:53
Hello,
Hmm... Frontainer's multilingual function current supports only admin area.
However, it's easy to change, by hardcoding the language strings into the template files under plugins/frontainer/tpl/. Then you can use I18n's global variable "$language" to determine which templates requires loading.
The language placeholder in Frontainer's template files always begin with "lang_", example: [[lang_legend_loginform]].
To make it multilingual, just create a new folders "da", "it", etc under "plugins/frontainer/tpl/" directory, copy and paste all template files in your folders and change hardcoded strings into corresponding languages.
Open "plugins/frontainer.php" file and delete the line at the top of the file:
Modify first line of the "frontainer_get_content()" function by adding $language (in same file):
Next, add following lines for the same function:
Then, search for "frontainer_setup()" function in the same file and add this line at the top of it:
that is all
Hmm... Frontainer's multilingual function current supports only admin area.
However, it's easy to change, by hardcoding the language strings into the template files under plugins/frontainer/tpl/. Then you can use I18n's global variable "$language" to determine which templates requires loading.
The language placeholder in Frontainer's template files always begin with "lang_", example: [[lang_legend_loginform]].
To make it multilingual, just create a new folders "da", "it", etc under "plugins/frontainer/tpl/" directory, copy and paste all template files in your folders and change hardcoded strings into corresponding languages.
Open "plugins/frontainer.php" file and delete the line at the top of the file:
Code:
define('FR_TEMPLATE_DIR', GSPLUGINPATH.'/frontainer/tpl/');
Modify first line of the "frontainer_get_content()" function by adding $language (in same file):
Code:
global $fronainer_file, $fc, $language;
Next, add following lines for the same function:
Code:
// templates directory
if($language != I18N_DEFAULT_LANGUAGE)
define('FR_TEMPLATE_DIR', GSPLUGINPATH.'/frontainer/tpl/'.substr($language, 0, 2).'/');
else
define('FR_TEMPLATE_DIR', GSPLUGINPATH.'/frontainer/tpl/');
Then, search for "frontainer_setup()" function in the same file and add this line at the top of it:
Code:
defined('FR_TEMPLATE_DIR') or define('FR_TEMPLATE_DIR', GSPLUGINPATH.'/frontainer/tpl/');
that is all