Welcome Guest, Not a member yet? Register   Sign In
How use translated database
#1

[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?
#2

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

please post your questions to the post above!
#3

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

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

[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.
#6

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

And the Multilingual package have a tutorial to use then?
#7

[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?
#8

[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?
#9

[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/ma...routes.php
#10

[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..




Theme © iAndrew 2016 - Forum software by © MyBB