Welcome Guest, Not a member yet? Register   Sign In
Load language array
#4

I also was interested of this question here but did not find the answer.
So I've decided do not load all translations in controller. I just output translations in view:

PHP Code:
<div><?= lang('file_lang.t1'?></div>
<div><?= lang('file_lang.t2'?></div> 

All translations are displayed in the language (locale) specified in the request. So you need to change locale in the request (if you don't do it) with $this->request->setLocale($locale) - in Controller or in Filter.
Reply


Messages In This Thread
Load language array - by henry_miaomiao - 11-16-2020, 04:41 AM
RE: Load language array - by InsiteFX - 11-16-2020, 06:28 AM
RE: Load language array - by henry_miaomiao - 11-16-2020, 06:36 AM
RE: Load language array - by T.O.M. - 11-16-2020, 07:20 AM
RE: Load language array - by henry_miaomiao - 11-16-2020, 08:13 AM
RE: Load language array - by InsiteFX - 11-16-2020, 01:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB