i18n language |
I'm building a multilangual app with both CI views, as Vuejs views. Therefore I switched to i18n json translations.
Very easy and accessible for both, since i can share the same language files lang_de.json, lang_en.json etc I added the php-i18n to my autload.php, so it's loaded as a library With this i18n-editor i can easily create files to translate within different languages. Code: { In controller: $this->i18n->setFilePath(APPPATH.'/lang/lang_de.json'); this->i18n->init(); In view: <?php echo L::greeting;?> What would be the best place to set : setFilePath to a language, and change when another language would be selected. Would this be a hook? |
Messages In This Thread |
i18n language - by ponzo - 10-26-2017, 04:48 AM
|