CodeIgniter Forums
Help on websites multilanguage. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Help on websites multilanguage. (/showthread.php?tid=50585)



Help on websites multilanguage. - El Forum - 03-31-2012

[eluser]jesusruiz[/eluser]
Hello and thanks for reading this message.

I need help/advice on how to develop a multilanguage website with CodeIgniter.
I have a few questions:

1) Should I create in the database, a table with repeating fields, one for each language?. That is, suppose I have two fields in a table called: title and text. Should I create two fields equal to the other language?:
title_english, text_english and title_other_language, text_other_language.


2) How do I detect the user's language?. In fact, in addition to automatically do it, I'd like a user could change the language, for example by clicking on a flag of language.

On this I read that I should use session variables. To use these session variables, is it not necessary that a user is registered, is this right?.


3) My last question is about HTML5, exactly with the lang attribute.
I have now a lang attribute like this:
<html lang="en">

How do I specify this attribute to have two languages ​​on my site?


These are complex questions, so I would appreciate any links or information, to learn about these issues.

Millions of thanks and greetings.