Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Funky JS idea for Multilingual stuff

Is it doable?



9:16 pm on Jun 4, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

I've got a largish site which is about 90-95% proper names. Most fits into a series of proper titles. So with that background, I'm experimenting with a JS mess to allow the titles to adjust to the user's requested language.
If you want to see a quick test of how the scheme might work look on my site at /test/langsys1/test3.html
The various JS files are in that same directory. (Beware this is obviously a pretty early test!)
One problem I seem to be hitting is detecting the user's preferred language. The document.language or document.userLanguage seem to always return what en (or en-us) regardless of the values I set in the browser's preferences. Is there a way to obtain the preferred list?
In the end I expect I'll provide a cookie method to override it the setting anyway, but it would be nice to have it a bit more user friendly.
(I'd be happy to outline the general scheme of the routines if that would be helpful. :-)



4:08 pm on Jun 5, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

there are some difficulties with any form of content-negotiation to choose a language, whether it be server side or javascript

you are assuming monolingual users who only ever use their own computer...for a lot of international, multilingual, organisations sucha s ours that simply isn't the case all the time

I work with over 20 languages...most of which I don't speak...the "guest" workstation in our office has been used over the last couple of months by speakers of Spanish, Japanese, Chinese, Lithuanian, French and Italian

so...however you end up doing it...don't do it in such a way as to enforce an automatic choice on users


6:48 pm on Jun 5, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Do you think that requiring them to allow a cookie is too much to ask? (in my current scheme that would be the worst case, I think)

Featured Threads

Hot Threads This Week

Hot Threads This Month