Forum Moderators: coopster

Message Too Old, No Replies

Cookie for Language Selection

         

misfit949

12:02 am on Aug 22, 2006 (gmt 0)

10+ Year Member



Hi, on my company website we have about 10-12 pages translated into both spanish and japanese. I would like to create some kind of script that would display the japanese pages when japanese is selected, and remember the selection in a cookie. However I'm not aware of how to do this since only 10 out of 200 of the pages are translated, and I don't want to do it the lazy way by just dumping all the english pages into the translated directory with the translated pages hard coded into the menus, links, etc.

Is this even possible? Would a better solution be to simply have a site map with the translated web pages listed and direct the user there when they select a language?

Any advice?

jatar_k

5:26 pm on Aug 22, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld misfit949,

you could the cookie route.

on a page you could

check to see if the page has an alternate language
check to see if the cookie is there
check what language they selected
redirect them to the appropriate language

as for the sitemap, I would list all the pages there as is, it will also help search engines find the pages

you could also just link to the translations from the english version and they could select it each time