mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #4868 from kinglozzer/4854-i18n-meta
FIX: Get locale from <html> element for i18n.js (fixes #4854)
This commit is contained in:
commit
4d2340a392
@ -198,8 +198,8 @@ ss.i18n = {
|
|||||||
var detectedLocale;
|
var detectedLocale;
|
||||||
|
|
||||||
// get by container tag
|
// get by container tag
|
||||||
rawLocale = jQuery('body').attr('lang');
|
rawLocale = jQuery('html').attr('lang') || jQuery('body').attr('lang');
|
||||||
|
|
||||||
// get by meta
|
// get by meta
|
||||||
if(!rawLocale) {
|
if(!rawLocale) {
|
||||||
var metas = document.getElementsByTagName('meta');
|
var metas = document.getElementsByTagName('meta');
|
||||||
|
Loading…
Reference in New Issue
Block a user