From bf29a01fdd85edeff937cbb2eed661cf00cfa9a6 Mon Sep 17 00:00:00 2001 From: Xaver Maierhofer Date: Fri, 21 Apr 2017 00:22:13 +0200 Subject: [PATCH] [TASK] Add lang attribute to html --- lib/utils/language.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/utils/language.js b/lib/utils/language.js index 5364d22..572c2be 100644 --- a/lib/utils/language.js +++ b/lib/utils/language.js @@ -61,6 +61,7 @@ define(['polyglot', 'moment', 'helper'], function (Polyglot, moment, helper) { router = r; window._ = new Polyglot({ locale: getLocale(router.getLang()), allowMissing: true }); helper.getJSON('locale/' + _.locale() + '.json?' + config.cacheBreaker).then(setTranslation); + document.querySelector('html').setAttribute('lang', _.locale()); } return {