EllisLab text mark
Advanced Search
1 of 2
1
   
How use translated database
Posted: 01 October 2012 10:35 AM   [ Ignore ]
Joined: 2012-09-24
23 posts

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?

 
Posted: 01 October 2012 10:45 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2010-08-26
122 posts

for multilingual site you could use Multilingual CI package.

please post your questions to the post above!

 
Posted: 01 October 2012 12:18 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2012-09-24
23 posts

How I use this to translate the database data ?

 
Posted: 01 October 2012 12:19 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Joined: 2012-09-24
23 posts

Is there any tutorial to this package ?

 
Posted: 01 October 2012 01:54 PM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2010-08-26
122 posts

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.

 
Posted: 01 October 2012 02:02 PM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Joined: 2012-09-24
23 posts

How I can translate the database together, have one method easy?

And the Multilingual package have a tutorial to use then?

 
Posted: 01 October 2012 02:06 PM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2010-08-26
122 posts

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?

 
Posted: 01 October 2012 02:38 PM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Joined: 2012-09-24
23 posts

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?

 
Posted: 01 October 2012 02:52 PM   [ Ignore ]   [ # 8 ]   [ Rating: 0 ]
Avatar
Joined: 2010-08-26
122 posts

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

 
Posted: 01 October 2012 03:43 PM   [ Ignore ]   [ # 9 ]   [ Rating: 0 ]
Joined: 2012-09-24
23 posts

we followed all the steps but I’m sorry to say its still not working :(
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..

 
Posted: 01 October 2012 03:47 PM   [ Ignore ]   [ # 10 ]   [ Rating: 0 ]
Avatar
Joined: 2010-08-26
122 posts

is localhost/example working?

 
Posted: 01 October 2012 04:08 PM   [ Ignore ]   [ # 11 ]   [ Rating: 0 ]
Joined: 2012-09-24
23 posts

No it gives the 404 error ..

 
Posted: 01 October 2012 05:10 PM   [ Ignore ]   [ # 12 ]   [ Rating: 0 ]
Avatar
Joined: 2010-08-26
122 posts

then you have not installed the package…

 
Posted: 02 October 2012 08:10 AM   [ Ignore ]   [ # 13 ]   [ Rating: 0 ]
Joined: 2012-09-24
23 posts

Hey there smile thanks a ton ...

Now its working, I am so sorry for it.. now localhost/example is working…
I wanna know how to implement this for the website..
like localhost/home
localhost/bysat these pages to work for these languages ...

Please tell me the steps..sorry to bother you so much ..

thanks

 
Posted: 02 October 2012 08:18 AM   [ Ignore ]   [ # 14 ]   [ Rating: 0 ]
Avatar
Joined: 2010-08-26
122 posts

first explain in detail what do you want to accomplish.

if example controller is working and it is possible to change the language there, then other controllers are working as well.

 
Posted: 02 October 2012 08:27 AM   [ Ignore ]   [ # 15 ]   [ Rating: 0 ]
Joined: 2012-09-24
23 posts

Ya sure… as you asked me to install the package and test with localhost/example if its working.Now it is working.

My problem is I have to convert a Portuguese website in english…I am asking you the steps what all changes should I make in all the files and the folders so that I get it ...
because i tried localhost/bysat_controllers ...the display is a blank page


Please explain in detail all the steps right from basics..Please

Thanks a ton smile May god bless you with more knowledge

 
1 of 2
1