problem changing the language |
[eluser]keevitaja[/eluser]
now i have problem with languages. Code: <?php i have both estonian and english versions in language folder isn't it possible to change the language like that? however if i change the config file and set $config['language'] = "english"; it will print out the english version!
[eluser]Kamarg[/eluser]
You want to use $this->load->lang as documented in the user guide.
[eluser]tomcode[/eluser]
You cannot change the language after You have loaded language files, only before. I. You can fetch a language file and keep the values in a variable, but only for language files You do not have already loaded. This works : Code: $lang = $this->lang->load('filename', 'language', true); This not : Code: $this->lang->load('filename', 'language'); II. I've written an extension to switch the language, it reloads all previous loaded language files Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
[eluser]keevitaja[/eluser]
i'm not sure why, but i can't change the languages Code: $this->load->library('language'); i still get the default(estonian) output
[eluser]tomcode[/eluser]
Code: // You do not need to load the library language, it is auto loaded by the system.
[eluser]keevitaja[/eluser]
i must be really stupid or missing something... Code: <?php
[eluser]keevitaja[/eluser]
can anyone help me with this test.php controller? why isn't it working? site_lang.php file is located in languages/english languages/estonian there is a value: $lang['site_username'] = 'Username'; when i change the language in config file, appropriate language will be used!
[eluser]keevitaja[/eluser]
this is resolved thanx to: http://ellislab.com/forums/viewthread/64118/#339962 |
Welcome Guest, Not a member yet? Register Sign In |