I’m using this URI Language Identifier
http://localhost/internationalisation/index.php/en/
http://localhost/internationalisation/index.php/en/welcome/
http://localhost/internationalisation/index.php/en/contact/
http://localhost/internationalisation/index.php/es/
http://localhost/internationalisation/index.php/es/welcome/
I’ve set $config['lang_ignore'] = FALSE; so the URL shows what language I’m currently using like above.
Question: How can enable users switching between languages?
These codes in View won’t work:
<a href="<?php echo site_url('en'); ?>">English</a>
<a href="<?php echo site_url('es'); ?>">Spanish</a>
because they produce links like this:
http://localhost/internationalisation/index.php/en/en
http://localhost/internationalisation/index.php/en/es
Thanks
Followed LastCoder’s first suggestion:
CONFIG:
VIEW:
CONTROLLER: