Welcome Guest, Not a member yet? Register   Sign In
Multilingual application
#1

Hi,
I am trying to find out how to make the web multilingual.
Can you tell me please, what is the best practice?

I have routes like this:
Code:
$route['((en|cz)/)?test'] = 'test/index';
Is there a way to write it better?

In MY_controller I do this:
PHP Code:
public $language 'sk'// should not be protected??? But I can not call it in template if it is protected
protected $languages = ['en''cz'];

public function 
__construct()
{
    
parent::__construct();

    if( 
in_array$s1 $this->uri->segment), $this->languages ) ) $this->language $s1;


Is it the right way to use?

Thanks.
Reply


Messages In This Thread
Multilingual application - by Camo - 09-14-2015, 12:06 PM
RE: Multilingual application - by rtorralba - 09-14-2015, 02:43 PM
RE: Multilingual application - by Camo - 09-14-2015, 03:14 PM
RE: Multilingual application - by rtorralba - 09-14-2015, 04:06 PM
RE: Multilingual application - by Camo - 09-14-2015, 04:26 PM
RE: Multilingual application - by rtorralba - 09-15-2015, 02:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB