I've got a script.js file which is located in common/static/js/ directory. Common i开发者_如何学Pythons a directory, not an application and I need to translate messages inside script into other languages. How should I configure my django project? Basic instructions please, because I'm dumm.
A simple approach is to set your translatable values at the template level for your JavaScript functions/classes to pick up:
var my_name= '{% trans my_name %}';But Django does have JavaScript internationalization.
精彩评论