(You can also dynamically load the locale file via JS)
To localize the Ext JS built-in component, add the following code: app.js : launch: function() { var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = "extjs/locale/ext-lang-" + navigator.language; head.appendChild(script); } launch: function() { var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = "extjs/locale/ext-lang-" + navigator.language; head.appendChild(script); }
To localize a custom Ext JS component, use Locale.js . We used it in two Ext JS projects. Pretty simple.
source share