Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] Language localization in Javacript
- Date: Tue, 27 Sep 2011 19:31:10 +0900
- From: Martin G <ebisumartin@example.com>
- Subject: [tlug] Language localization in Javacript
TLUG, This is probably a basic concept I'm not getting, but I'm a little lost on how to enable localization in my Javascript code. I can easily set up different objects containing different language strings. Something like: var english = new Object (); english.l00001 = "hello"; english.l00002 = "goodbye"; var japanese = new Object () japanese.l00001 = "今日は"; japanese.l00002 = "サヨナラ"; (I put an "l" in front of each number because Javascript doesn't seem to like variable names that are just numbers.) ... but I just can't think of how I switch them up at the point when I want to display one or the other, because the switch involves changing the name of the variable being called. There must be a simple way to do this...? Any advice would be much appreciated. -- Dave M G
- Follow-Ups:
- Re: [tlug] Language localization in Javacript
- From: Darren Cook
- Re: [tlug] Language localization in Javacript
- From: Lewske Wada
- Re: [tlug] Language localization in Javacript
- From: Paul McMahon
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Bitsa Woes: Reply and SOLUTION
- Next by Date: Re: [tlug] Language localization in Javacript
- Previous by thread: Re: [tlug] Can I get someone to hold my hand with all this oAuth stuff? [SOLVED]
- Next by thread: Re: [tlug] Language localization in Javacript
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links