Problem with linking my web pages

  You are currently not logged in. You can view the forums, but cannot post messages. Log In | Register

01-Feb-12 21:10
I am simply developing a HTML website page, on this page, there are two flag images(USA and Poland) which is used as a language selection of the page for users.

I am wondering, for this single web page development (without any backend system), is there any efficient way to implement the page localization(that's display the page in different language) based on the flag selection from user?

Thank you
02-Feb-12 23:03
@justyna26: Use a cookie to store the language preference (English or Polish).

If it's just one page then you might get away with using JavaScript in the page to display the page in English or Polish based on the cookie value. However if you have a multi-page site then you'll want to use server-side code such as PHP to read the cookie and serve either English or Polish pages to the user.

Bear in mind that the JavaScript approach won't work for users who have JavaScript disabled in their browsers.

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/

 
New posts
Old posts

Follow Elated