Set only available languages
This commit is contained in:
parent
45da8a9c86
commit
c63e35acfe
2 changed files with 6 additions and 20 deletions
|
|
@ -9,21 +9,12 @@ angular.module('copayApp.services')
|
|||
}, {
|
||||
name: 'Français',
|
||||
isoCode: 'fr',
|
||||
}, {
|
||||
name: 'Italiano',
|
||||
isoCode: 'it',
|
||||
}, {
|
||||
name: 'Deutsch',
|
||||
isoCode: 'de',
|
||||
}, {
|
||||
name: 'Español',
|
||||
isoCode: 'es',
|
||||
}, {
|
||||
name: 'Português',
|
||||
isoCode: 'pt',
|
||||
}, {
|
||||
name: 'Ελληνικά',
|
||||
isoCode: 'el',
|
||||
}, {
|
||||
name: '日本語',
|
||||
isoCode: 'ja',
|
||||
|
|
@ -31,9 +22,6 @@ angular.module('copayApp.services')
|
|||
}, {
|
||||
name: 'Pусский',
|
||||
isoCode: 'ru',
|
||||
}, {
|
||||
name: 'Türk',
|
||||
isoCode: 'tr',
|
||||
}];
|
||||
|
||||
root.currentLanguage = null;
|
||||
|
|
@ -50,6 +38,11 @@ angular.module('copayApp.services')
|
|||
}
|
||||
userLang = userLang ? (userLang.split('-', 1)[0] || 'en') : 'en';
|
||||
|
||||
// Set only available languages
|
||||
userLang = lodash.find(root.availableLanguages, {
|
||||
'isoCode': userLang
|
||||
}) ? userLang : 'en';
|
||||
|
||||
return userLang;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue