Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

Home Page Mailing List Linux and Japan TLUG Members Links