This helper for mulit-language support, you can make the multi-language site very easily with this helper
you need to configure in the gate.php when you want to change the default path of i18n
define('I18N_PATH',ROOT_DIR.'/text'); // i18n directory
Set the langugae code for i18n in dev_config.php file.
$config['language']='en';
Sometimes you need to change the language code for support of mulit-language on your site.
$FE->I18n->setLang("language-code");
default directory is /text and you can put the file to the directory.File name will be language-code.
For example /text/en , /text/fr , /text/de, /text/kr , /text/jp,,,
the format is below.
{ // start the file
"Hello" : "Hi", // "text will be translated : translated text "
"How are you ?" : "How r u ?",
"Nice" : "Good",
"Text $a" : "Good $a"
} // end the file
$Frontend->I18n->t("Hello");
Sometime you need to put the variable to the i18n such as "Hello user-name" .
{ // start the file
"Hello $user" : "Hi $user"
} // end the file
Below is for example to explain how to pass the variable
$Frontend->I18n->t("Text \$a",array("a"=>1));