468,316 Members | 2,106 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,316 developers. It's quick & easy.

Dynamic translation to various languages

Hi,

I'd like to offer 4 versions of my website (3 foreign languages) this way:

- I want the language to be detected by the browser
- I want to be able to choose the language I want by one of 4 radio buttons
- I want dynamic real-time refresh of the whole page to the selected language without the
page having to refresh
- I want it to work on IE, Firebird, Mozilla & Opera

Could some one help me out please?
Thanks,

--
Charles.
Jul 20 '05 #1
2 1827
"Charles" <go***********@yahoo.com> writes:
I'd like to offer 4 versions of my website (3 foreign languages) this way:

- I want the language to be detected by the browser
Hard, going on impossible, depending on the browser. Content language
negoatiation really should happen between the browser and the server,
where there are protocols for it.
- I want to be able to choose the language I want by one of 4
radio buttons
Much easier. Use the onclick event handler on the radio buttons
to "do something'
- I want dynamic real-time refresh of the whole page to the
selected language without the page having to refresh
Are you using "page" and "refresh" in two different meanings her?
Because you ask for the page to refresh without the page having to
refresh!

Do you meant that the page should refresh without reloading?
(Which would require all four languages to be downloaded at the same
time, every time a page is loaded. A serious resource drain for people
who only use one lanugage)
- I want it to work on IE, Firebird, Mozilla & Opera


I would add "and any standards supporting browser".

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2
Lasse Reichstein Nielsen wrote:
"Charles" <go***********@yahoo.com> writes:
- I want to be able to choose the language I want by one of 4
radio buttons


Much easier. Use the onclick event handler on the radio buttons
to "do something'


And don't use it since there is no "translation" without client-side
JavaScript support. Use a server-side script instead, add a submit
button and pass the selection to the server-side script on submit.

However, the most simple and scriptless way is a hyperlink to each of the
versions (`en/English', `fr/Français, `de/Deutsch' aso. -- do *not* use
flags!). You should combine that with content negotiation. In contrast
to a document for each language, multiple language versions within one
script are hard to maintain.
PointedEars
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Gibby Koldenhof | last post: by
11 posts views Thread by Marco Loskamp | last post: by
3 posts views Thread by Stephen Gennard | last post: by
reply views Thread by Pascal Costanza | last post: by
reply views Thread by alexandre.bergel | last post: by
reply views Thread by Alexandre Bergel | last post: by
5 posts views Thread by bearophileHUGS | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.