I’ve got a script.js file which is located in common/static/js/ directory. Common is 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.
I’ve got a script.js file which is located in common/static/js/ directory. Common is a
Share
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.