Skip to content

Commit

Permalink
🐞 default translation appears when switching language for the first t…
Browse files Browse the repository at this point in the history
…ime (#361)

Parent issue: sequentech/meta#315
  • Loading branch information
Findeton authored Nov 9, 2023
1 parent a3052ce commit a6d14d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 4 additions & 2 deletions avUi/change-lang-directive/change-lang-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,14 @@ angular.module('avUi')
angular.element('#ng-app').attr('lang', scope.deflang);

// async load moment i18n
angularLoad
/*angularLoad
.loadScript(ConfigService.base + '/locales/moment/' + lang + '.js')
.then(function () {
amMoment.changeLocale(lang);
});
});*/
};
$i18next.options.useLocalStorage = true;

}

return {
Expand Down
7 changes: 2 additions & 5 deletions dist/appCommon-vmaster.js
Original file line number Diff line number Diff line change
Expand Up @@ -1132,11 +1132,8 @@ angular.module("avRegistration").config(function() {}), angular.module("avRegist
ipCookie("lang", lang, _.extend({
expires: 360,
path: "/"
}, ConfigService.i18nextCookieOptions)), scope.deflang = lang, angular.element("#ng-app").attr("lang", scope.deflang),
angularLoad.loadScript(ConfigService.base + "/locales/moment/" + lang + ".js").then(function() {
amMoment.changeLocale(lang);
});
};
}, ConfigService.i18nextCookieOptions)), scope.deflang = lang, angular.element("#ng-app").attr("lang", scope.deflang);
}, $i18next.options.useLocalStorage = !0;
},
templateUrl: "avUi/change-lang-directive/change-lang-directive.html"
};
Expand Down

0 comments on commit a6d14d1

Please sign in to comment.