Determine allowed zone from admin boundaries (#359)

This commit is contained in:
Norbert Renner 2021-01-15 22:29:20 +01:00 committed by GitHub
parent 5df0765d51
commit a5f04dd9cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 1925 additions and 1171 deletions

View file

@ -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;
},
};