diff options
Diffstat (limited to 'client/components/users/userHeader.js')
-rw-r--r-- | client/components/users/userHeader.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/client/components/users/userHeader.js b/client/components/users/userHeader.js index 73a11fc0..10fb7e62 100644 --- a/client/components/users/userHeader.js +++ b/client/components/users/userHeader.js @@ -72,9 +72,17 @@ Template.changePasswordPopup.onRendered(function() { Template.changeLanguagePopup.helpers({ languages() { - return _.map(TAPi18n.getLanguages(), (lang, tag) => { - const name = lang.name; - return { tag, name }; + return _.map(TAPi18n.getLanguages(), (lang, code) => { + return { + tag: code, + name: lang.name, + }; + }).sort(function(a, b) { + if (a.name === b.name) { + return 0; + } else { + return a.name > b.name ? 1 : -1; + } }); }, |