I would like to be able to internationalize the backbone + Handlebars application, but I do not know how best to do this. Are there any specific recommendations for the internationalization of trunk + handrail of views?
On the server side, I use SpringMVC and have access to the standard java internationalization tools.
Here are some very good resources for internationalization for the client side.
http://2012.jsconf.eu/speaker/2012/08/28/client-side-internationalization.html , java- script.
http://alexsexton.com/blog/2012/03/the-ux-of-language/
JavaScript :
:
( ) , Backbone.Marionette.Renderer.render. , (, , ), . , (, ) ,
Backbone.Marionette.Renderer.render
data = _.extend(, {t: (: ))
, , SpringMVC, .
i18next (http://i18next.com) // . PO JSON . ( .) .
You can use it in Handlebars with both static keys (strings) and dynamic variables. You will need to configure your own Handlebars helpers, but the i18next documentation provides sample code for this.
In this post, I added additional implementation details: fooobar.com/questions/788944 / ...