breeze - How to implement multilingualism in SPA -


i'm struggling problem of multilingualism in spa.

i've come several solutions, building wrapper resources resx files, or saving labels in database, wondering if of have found solution automates these steps.

are there practices specific problem?

for reasonable amount of literals, suggest save resources in db or in .resx file in server. when user logs in or detect language used, literals requested application , saved either in collection of translation module or in localstorage of browser (this approach large data). module have methods retrieve messages, passing key.

using solution inject module in viewmodels need show translated literals , acces them through view:

<p data-bind="text: resourcemanager.get('m01')"></a> 

for large applications require huge localization data transfered, maybe kind of modularity applied , load resources needed each module/section.

i don't think making recurrent requests server translated literals practise. spa's should provide user experience , loading translated literals server blocking issue. text not image, can render page without images loaded, imagine rendering page without text :o

anyway, think best solution keep server repository , create custom js module takes care data in 1 or multiple loads , able store somewhere in client.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -