Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
sencha extjs 6 - load locale dynamically
function loadLocale(){
var query = Ext.Object.fromQueryString(,
lang = query.lang ? query.lang.toLowerCase() : 'en';
if (lang === 'pt'){
lang = 'pt_BR';
var extJsFile = Ext.util.Format.format("resources/locale/ext-locale-{0}.js", lang);
if (lang !== 'en'){
Ext.Loader.loadScript({url: extJsFile});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.