Jump to content

Websites in more than one language


Recommended Posts

All language conversion kits i've seen cost money. Although i maybe wrong on that. Its been a while since i've looked at it. Either way, you will need a server side language to change the language of the page, or, create 2 versions of your site, and get the user to click on their language before entering. The latter will require alot of work, both now and in the future, but the first one will save alot of time in the future.Have a look around for "website language conversions" or something along those lines. See what you can find.Hope that helps:)

Link to post
Share on other sites

If you want to auto-detect the language that the browser is reporting, the best way would probably be to look in the Accept-Language request header. Here is the HTTP/1.1 spec, scroll down to 14.4 to see the description of Accept-Language:http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.htmlBut not all browsers will send that header. If the header is not present, then you might want to look in the user agent string for the browser. Many browsers will put the language somewhere in the user agent string, like this:Mozilla/5.001 (windows; U; NT4.0; en-us) Gecko/25250101That example is from the Mozilla page on guidelines for creating the user agent string:http://www.mozilla.org/build/revised-user-agent-strings.htmlNot all browsers use that format (in fact, most do not). Here is a page that lists user agent strings for a lot of different browsers:http://www.pgts.com.au/pgtsj/pgtsj0208c.htmlYou'll need to look in that list and figure out some regular expressions to use to capture whatever browsers you want to target. You'll notice that some browsers do not put the language in the user agent string, so for some people you will not be able to tell.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...