Forum Moderators: coopster

Message Too Old, No Replies

automatic site translating

how to configure translation off of browser language

         

ilustrate

7:31 am on Jul 27, 2005 (gmt 0)

10+ Year Member



i recently found this cool script on a program i was installing and thought it would be ideal for the local tourist site in my area. it's really cool and does a great job translating. Just wondered if i could improve on it some more by adding a few little extras. (1) wanted to see if i can recognize the browser language of the visitor and automatically feed the new language. (2) also thought it might be cool to add a changing title bar appropriate for the language viewing visitor. if you have an even better suggestion or solution please let me know thank you.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>In your language</title>
</head>

<body>
<table align="center" cellpadding=2 cellspacing=7 class=normal width=70% border="0" >
<tr>
<td colspan="2" nowrap class='title' valign="middle">Choose your language

</td>
</tr>
<div align="center" class="normal"><font face=Arial size=2>Translate: <a href="http://babelfish.altavista.com/babelfish/tr?doit=done&url=http://www.example.com&lp=en_es">Spanish</a> ¦ <a href="http://babelfish.altavista.com/babelfish/tr?doit=done&url=http://www.example.com&lp=es_en">English</a> ¦ <a href="http://babelfish.altavista.com/babelfish/tr?doit=done&url=http://www.example.com&lp=en_nl">Dutch</a> ¦ <a href="http://babelfish.altavista.com/babelfish/tr?doit=done&url=http://www.example.com&lp=en_fr">French</a> ¦ <a href="http://babelfish.altavista.com/babelfish/tr?doit=done&url=http://www.example.com&lp=en_pt">Portuguese</a> ¦ <a href="http://babelfish.altavista.com/babelfish/tr?doit=done&url=http://www.example.com&lp=en_zt">Chinese</a> ¦ <a href="http://babelfish.altavista.com/babelfish/tr?doit=done&url=http://www.example.com&lp=en_ja">Japanese</a>

</font>

</div>
</body>
</html>

[edited by: jatar_k at 4:57 pm (utc) on July 27, 2005]
[edit reason] examplified url [/edit]

DanA

10:07 am on Jul 27, 2005 (gmt 0)

10+ Year Member



You can recognize the browser preferred language, but it's quite unreliable.
You can have an included php file depending on the detected language but you must offer a choice to the user (a tourist) as he can use a friend's pc or be in a café...

ilustrate

5:34 pm on Jul 27, 2005 (gmt 0)

10+ Year Member



i wanted to have the choices included in throughout the site but still wanted to have the browser recognition.

i visited another site this morning that i definetly know is a native spanish site and yet it recognizes my english browser perfectly.

[somesite.com...]

it looks like alot of major sites like

[java.com...]
also redirect you to the proper site per browser language and/or either IP location. Any ways to do this as well.