Welcome Guest, Not a member yet? Register   Sign In
Easier Multiple Language Support - will this work?
#7

[eluser]haydenp[/eluser]
Quote:And how are you going to let a user switch the language?

Code:
<?php echo anchor($this->uri->uri_string() . '/en', 'English'); ?>
<br />
&lt;?php echo anchor($this->uri->uri_string() . '/pt', 'Portuguese'); ?&gt;

These links feature on the top of the page in my header -OR- you could have flag icons or a select box of the languages you support for the user to choose from ... your choice.

Each language link links to the current page you are on with the selected language of your choice passed as a variable, your autoloaded library class "my_language_selection_test" picks up the variable as the page loads and loads the selected language.

NOTE: That is the only time the language variable will be present in the url, from then on in it is held in the session ... as such, no further URI_Language_Identifier maintenance is required and no routes.php changes etc etc ...


Messages In This Thread
Easier Multiple Language Support - will this work? - by El Forum - 03-16-2009, 05:54 AM
Easier Multiple Language Support - will this work? - by El Forum - 03-16-2009, 06:10 AM
Easier Multiple Language Support - will this work? - by El Forum - 03-18-2009, 10:27 AM
Easier Multiple Language Support - will this work? - by El Forum - 03-18-2009, 11:13 AM
Easier Multiple Language Support - will this work? - by El Forum - 03-18-2009, 11:27 AM
Easier Multiple Language Support - will this work? - by El Forum - 03-18-2009, 01:02 PM
Easier Multiple Language Support - will this work? - by El Forum - 03-18-2009, 01:43 PM
Easier Multiple Language Support - will this work? - by El Forum - 04-18-2009, 09:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB