CodeIgniter Forums
Problem with Internationalization - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Problem with Internationalization (/thread-22156.html)



Problem with Internationalization - El Forum - 08-31-2009

[eluser]ericphp[/eluser]
Hi,

I am planning to create a webpage that is first launched in one or two languages, but later on will be expanded to more languages.

I have found a pretty cool language librarie ( http://codeigniter.com/wiki/Language_Selection_2/ )

I really like the fact that it is really user friendly, and easy to implement.
But I do not like to store all the text in these different language files.

I would like to have a language database with collumns for the different languages and rows for the content.

Does anybody have any ideas how I could realize this? Did anybody accomplish something simmilar in the past?

Thank you really much in advance!
Best regards,
Eric


Problem with Internationalization - El Forum - 08-31-2009

[eluser]n0xie[/eluser]
Why not output your database to the language files? This way you can easily Create/Read/Update/Delete your language 'labels' via the Database. Once you're done, regenerate the language files...


Problem with Internationalization - El Forum - 08-31-2009

[eluser]ericphp[/eluser]
Hi n0xie,

thanks for your fast reply.
But what do you mean - I can not follow you right now.

Could you please be a bit more precise?

Thanks.
Eric


Problem with Internationalization - El Forum - 08-31-2009

[eluser]Dam1an[/eluser]
You (for whatever reason) don't want to store the language translations in the language files, but would rather set them in the database (probably so you can easily add/edit/delete them?)
So instead of modifying the way the language class works to read from the database (and make loads of calls for each page) which not store them in the database, but every time you make a change, it will build a language file for you, with the contents of the language tables in the database
At least thats what I assume he means... make sense?


Problem with Internationalization - El Forum - 08-31-2009

[eluser]n0xie[/eluser]
[quote author="Dam1an" date="1251740597"]
At least thats what I assume he means...[/quote]
Yes.


Problem with Internationalization - El Forum - 08-31-2009

[eluser]ericphp[/eluser]
Thanks a lot,

I will try this!

Best regards,
Eric