We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4079de9 commit 3a82894Copy full SHA for 3a82894
lib/utils/i18n.js
@@ -29,10 +29,14 @@ var getByLanguage = function(lang) {
29
30
var compareLocales = function(lang, locale) {
31
var langMain = _.first(lang.split("-"));
32
+ var langSecond = _.last(lang.split("-"));
33
+
34
var localeMain = _.first(locale.split("-"));
35
+ var localeSecond = _.last(locale.split("-"));
36
37
if (locale == lang) return 100;
38
if (localeMain == langMain) return 50;
39
+ if (localeSecond == langSecond) return 20;
40
return 0;
41
};
42
0 commit comments