mirror of
https://github.com/ansible/awx.git
synced 2026-05-15 13:27:40 -02:30
Merge pull request #5368 from shanemcd/tweak-ui-language-lookup-logic
Tweak logic used by UI to detect language
This commit is contained in:
@@ -19,8 +19,10 @@ export default
|
|||||||
.factory('I18NInit', ['$window', 'gettextCatalog',
|
.factory('I18NInit', ['$window', 'gettextCatalog',
|
||||||
function ($window, gettextCatalog) {
|
function ($window, gettextCatalog) {
|
||||||
return function() {
|
return function() {
|
||||||
var langInfo = $window.navigator.language ||
|
var langInfo = ($window.navigator.languages || [])[0] ||
|
||||||
$window.navigator.userLanguage;
|
$window.navigator.language ||
|
||||||
|
$window.navigator.userLanguage ||
|
||||||
|
'';
|
||||||
var langUrl = langInfo.replace('-', '_');
|
var langUrl = langInfo.replace('-', '_');
|
||||||
//gettextCatalog.debug = true;
|
//gettextCatalog.debug = true;
|
||||||
gettextCatalog.setCurrentLanguage(langInfo);
|
gettextCatalog.setCurrentLanguage(langInfo);
|
||||||
|
|||||||
Reference in New Issue
Block a user