
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] Language localization in Javacript [SOLVED]
- Date: Thu, 29 Sep 2011 14:55:44 +0900
- From: Martin G <ebisumartin@example.com>
- Subject: Re: [tlug] Language localization in Javacript [SOLVED]
Lewske, TLUG
Thank you for responding.
> Why don't you add more branches in the switch-case statement?
>
> switch (navigator.language.substr(0, 2)) {
> case "en" :
> document.writeln("Hello.");
> break;
> case "de" :
> document.writeln("Guten Tag.");
> break;
> }
A switch worked great! Thanks for suggesting it!
--
Dave M G
Home |
Main Index |
Thread Index