Small fix - replace regex with string split

This commit is contained in:
PanAeon 2018-10-22 17:55:54 +01:00
parent d26d9c4674
commit ff37a369da

View file

@ -88,7 +88,7 @@ var vcsModeRefresh = function(eventData) {
var intlRefresh = function() { var intlRefresh = function() {
if (!window.$) { return; } if (!window.$) { return; }
var countryCode = LocaleStore.getLocale().replace(/_(.*)$/i, ""); var countryCode = LocaleStore.getLocale().split("_")[0];
$("html").attr('lang', countryCode); $("html").attr('lang', countryCode);
$("meta[http-equiv='content-language']").attr("content", countryCode); $("meta[http-equiv='content-language']").attr("content", countryCode);
$('span.intl-aware').each(function(i, el) { $('span.intl-aware').each(function(i, el) {