internationalization - CakePHP: Reload .po file after changing language -


i have change current language select system form submit selectbox ajax submit. so, when language changed, have return login labels change them javascript (specifically, username, password , login button labels).

the problem that, although change language successfully, .po file loaded, return me previous language.

this code:

public function cambiar_idioma($idioma) {     $this->session->write('login.language', $idioma);     configure::write('config.language', $idioma);     $this->set(array(         'usuariologin' => __("usuario"),          'usuariopassword' => __("contraseƱa"),          'login-button' => __("ingresar")     ));     $this->set('_serialize', array('usuariologin', 'usuariopassword', 'login-button')); } 

so, when change 'spa', set new language, .po files loaded, array return in english. , vice-versa. suppose have load .po files again before returning array, don't know how it.

is there way this?

try calling i18n::clear(), not sure if trick because clear translation domains you're using __() instead of __d(), give try.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -