Determine allowed zone from admin boundaries (#359)
This commit is contained in:
parent
5df0765d51
commit
a5f04dd9cd
14 changed files with 1925 additions and 1171 deletions
13
js/Util.js
13
js/Util.js
|
|
@ -107,4 +107,17 @@ BR.Util = {
|
|||
temp.textContent = str;
|
||||
return temp.innerHTML;
|
||||
},
|
||||
|
||||
isCountry: function (country, language) {
|
||||
// de-DE | fr-FR
|
||||
var lang = i18next.languages[0].split('-');
|
||||
|
||||
if (lang.length > 1) {
|
||||
// if available only test country, to avoid e.g. de-CH to match
|
||||
return lang[1] === country;
|
||||
}
|
||||
|
||||
// fallback when country not available
|
||||
return lang[0] === language;
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue