Mailing List Archive


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

Re: [tlug] Language localization in Javacript




Hi again,


On 28/09/11 17:03, Raymond Wan wrote:
On 28/09/11 16:40, Martin G wrote:
var x=(language=="en"?english:japanese);
I don't know JavaScript so I can't help you with the specific language,
but in general, you would probably have to expand a ?: to a series of
if...elseif...else statements. If the language supports it, then some
kind of switch/case statements would be ideal.


Forgot to mention that you probably could nest ?: -- I've never seen it done before but I suppose it is possible. However, you would probably mess up your eyesight when you look at your source code... :-)

Ray




Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links