Language related question |
[eluser]Tsu88[/eluser]
Hello! I am new to codeigniter (using it for less than a month and already have two project to make) and new to using framework for doing job done. I learned about MVC quite quickly and I like CI a lot. So here is my situation: I am making a school project - renewal of laboratory site - and it has to be in our native language (slovenian) and in english. I read about language classes and all but I don't get one thing. Let's say I have a table called News and there are usual fields, where I have two fields for content: content_sl and content_en. In my view file I would like to display content of content_sl if user defines his language as Slovenian and vice versa. So I would create set of controllers for english and another one for slovenian interface? I don't know the right approach, because I never worked on multilanguage page before. Could I just create unique controller that would have a variable that defines language? Therfore when visitor selects english, query would be sent to controller saying I want english and controller would look in a database and get values for english ... ? I am sorry if all together sounds a little bit confusing, but take in consideration that I am new with all this framework work. I would be really happy if one could direct me in right direction, I will do my work (teaching and reading) I just need a hint ![]() ADDED: I forgot to add that i would like my URL to look like www.example.com/en/something and www.example.com/sl/something ... So when user selects his language that en or sl would always be before all other functions. Thanks in advance, Matic |
Messages In This Thread |
Language related question - by El Forum - 05-20-2009, 02:53 PM
Language related question - by El Forum - 05-20-2009, 03:29 PM
Language related question - by El Forum - 05-20-2009, 03:37 PM
Language related question - by El Forum - 05-20-2009, 03:54 PM
Language related question - by El Forum - 05-20-2009, 04:04 PM
Language related question - by El Forum - 06-02-2009, 02:40 AM
Language related question - by El Forum - 06-02-2009, 04:18 AM
Language related question - by El Forum - 06-02-2009, 06:54 AM
Language related question - by El Forum - 06-02-2009, 07:08 AM
Language related question - by El Forum - 06-03-2009, 10:55 AM
Language related question - by El Forum - 06-03-2009, 02:10 PM
Language related question - by El Forum - 06-04-2009, 09:05 AM
Language related question - by El Forum - 11-16-2009, 10:16 PM
Language related question - by El Forum - 01-19-2010, 02:38 AM
|