How to work with Interlization concept in javascript or jQuery -


in project using interlization using spring mvc it's working fine .but want show alret() message end user according selected language .how 1 me.i using hidden fields in view layer performance issue occur way read properties file data using javascript or jquery

you can use nested objects. example:

// init dictionary var messages = {     en : {},     es : {} };  // populate messages.en['welcome'] = 'welcome'; messages.es['welcome'] = 'bienvenido';  // test     var lang = 'es'; alert(messages[lang]['welcome']); 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -