what's the best way to create multiple-language websites?

Alex

Diamond Member
Oct 26, 1999
6,995
0
0
you know those websites that all you do is click on a flag and the entire content changes language?

i want to do something like that... i already have the text in all the languages i need and instead of doing a "select language" on the index page and displaying different subdirectories in different languages, i was wondering if there was a better way to do this, using javascript or something, where i can have a list of strings for the sections and just have the browser load the relevant one depending on the selected language?

thanks
 

troytime

Golden Member
Jan 3, 2006
1,996
1
0
put all the content in a database, with english and klingon and any other languages

pull the content according to the page ID and selected language

navigations and such would likely be best to have an include file for each language
 

jjones

Lifer
Oct 9, 2001
15,424
2
0
I'm doing a site like that right now using php. All the pages are coded to accept language packs which are essentially includes. I'm only working on English right now but each page is being coded to accept any language and down the road I'll start working on having the English language pack translated into several other languages. Then all I'll have to do is upload them and put the language selection feature on the site and it's ready to go. The nice thing about this is you're not duplicating your entire site just to accommodate another language. You just create a new language pack and you're all set. For my purposes, I prefer using language pack includes over database for these kinds of things to reduce the load on the DB.

Nothing unique about this though and it's pretty common to do it this way.
 

pstylesss

Platinum Member
Mar 21, 2007
2,914
0
0
Originally posted by: jjones
I'm doing a site like that right now using php. All the pages are coded to accept language packs which are essentially includes. I'm only working on English right now but each page is being coded to accept any language and down the road I'll start working on having the English language pack translated into several other languages. Then all I'll have to do is upload them and put the language selection feature on the site and it's ready to go. The nice thing about this is you're not duplicating your entire site just to accommodate another language. You just create a new language pack and you're all set. For my purposes, I prefer using language pack includes over database for these kinds of things to reduce the load on the DB.

Nothing unique about this though and it's pretty common to do it this way.

Are you using PHPNuke or some other pre-packaged website?

-------------

There are a couple different ways you can change languages, one is like what troytime said, where you display certain content from the database depending on the page id.

Assuming you are using PHP, you would create a if/else statement looking (example) index.php?page=news&lng=en-us, if en-us exists, pull content from x, if en-uk exists, pull content from y.


Another way to do it is if the users can log in (or even if they cant), create sessions instead of cluttering up the URL. As long as your strip the session ID from the URL, it will make your URLs more search engine friendly. If you have members, you can just have the select their default language during register, then display correct language based on their selection.

I hope I could be of some help.
 

Alex

Diamond Member
Oct 26, 1999
6,995
0
0
thanks! i like the includes best so far but they are all good suggestions!
and no i'm not using any prepackaged website...
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |