jquery - How to better structure multilingual Javascript code? -


we rewriting jquery code of our web service , thinking on better way organize it. we've been reading several questions, articles, etc; , first approach, love receive feedback.

we going have class each object of page (place, user, etc). planning use low pro (article) have code in 1 place.

however there variables need pass php (user.id, user.name, etc). have thought best way print json , pass general class.

var array = {   'key1' => 'value',   'key2' => 'value',   'key3' => 'value', }; var te = new te(array); 

te.js assign variables there other classes can use them. have multilingual web, need have messages in several languages. similar answers of multilingual alert messages in javascript

what think? there better way load initial array? other suggestion or article?

thanks!

i store translated words in separate js can cached client, , wont suffer repeated data (ie, multiple jquery classes can reference same index same word).


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -