CodeIgniter Forums
How use translated database - 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: How use translated database (/thread-54911.html)

Pages: 1 2 3


How use translated database - El Forum - 10-01-2012

[eluser]Shwetang[/eluser]
I'm translating my website, and would like to know the best way to use the translated database.
I need to know how can I identify when the user accesses the url in en or pt, for example:

localhost / pt / home
localhost / en / home

Have a site that is set in the lang helper or I'll have to pick up via URL and if it is picked up via URL as the language?



How use translated database - El Forum - 10-01-2012

[eluser]keevitaja[/eluser]
for multilingual site you could use Multilingual CI package.

please post your questions to the post above!


How use translated database - El Forum - 10-01-2012

[eluser]Shwetang[/eluser]
How I use this to translate the database data ?


How use translated database - El Forum - 10-01-2012

[eluser]Shwetang[/eluser]
Is there any tutorial to this package ?


How use translated database - El Forum - 10-01-2012

[eluser]keevitaja[/eluser]
well this package has nothing to do with databases. it just sets the multilingual enviroment.

you can use $ci->lang->mci_current() to get the language segment.


How use translated database - El Forum - 10-01-2012

[eluser]Shwetang[/eluser]
How I can translate the database together, have one method easy?

And the Multilingual package have a tutorial to use then?


How use translated database - El Forum - 10-01-2012

[eluser]keevitaja[/eluser]
no tutorial. just copy the files to you CI installation.

BE CAREFUL: do not overvrite autoload.php and routes.php in config folders. just make the changes

btw what is this database translation anyway? lol. you want to have a site with more than one language and each language has it's own content? like cms?


How use translated database - El Forum - 10-01-2012

[eluser]Shwetang[/eluser]
Yes it this like CMS.

I have other question, in my application when I click home (home is a route to main_controller) must keep the prefix language like gr, en, pt.

Routes:

$ route ['home'] = 'main_controller';

Address when I click home

http://localhost/en/main_controller/home

I get the error:

404 Page Not Found

The page you requested was not found.

You can help me?


How use translated database - El Forum - 10-01-2012

[eluser]keevitaja[/eluser]
have you installed the multilingual ci package?

as i said, first you must set up the multilingual inviroment for your cms.

check how the uri re-mapping is done:

https://github.com/keevitaja/mci/blob/master/application/config/routes.php


How use translated database - El Forum - 10-01-2012

[eluser]Shwetang[/eluser]
we followed all the steps but I'm sorry to say its still not working Sad
like i will explain the steps :
downloaded the mci package ..put all the files at respective locations... then changed the name of the other files which already existed ...
we made a language file with mci_lang.php, put in english folder and then when I attempt to access http://localhost/en/main_controller/ this I get blank screen ....

Please help..