2012-12-16 18:52:39 +01:00
|
|
|
(function(document) {
|
|
|
|
// Set language for l10n
|
2013-02-17 21:35:46 +01:00
|
|
|
var language = document.cookie.match(/language=((\w{2,3})(-\w+)?)/);
|
2012-12-16 18:52:39 +01:00
|
|
|
if(language) language = language[1];
|
2013-02-17 21:35:46 +01:00
|
|
|
|
2012-12-16 18:52:39 +01:00
|
|
|
html10n.bind('indexed', function() {
|
|
|
|
html10n.localize([language, navigator.language, navigator.userLanguage, 'en'])
|
|
|
|
})
|
2019-04-16 00:34:29 +02:00
|
|
|
|
2012-12-16 18:52:39 +01:00
|
|
|
html10n.bind('localized', function() {
|
|
|
|
document.documentElement.lang = html10n.getLanguage()
|
2012-12-23 16:51:14 +01:00
|
|
|
document.documentElement.dir = html10n.getDirection()
|
2012-12-16 18:52:39 +01:00
|
|
|
})
|
2019-04-16 00:34:29 +02:00
|
|
|
})(document)
|