Browse Source

Provide active language through appData service.

pull/82/head
Joachim Bauch 11 years ago
parent
commit
5a20d4415a
  1. 8
      static/js/services/appdata.js

8
static/js/services/appdata.js

@ -37,6 +37,10 @@ define(["jquery"], function($) { @@ -37,6 +37,10 @@ define(["jquery"], function($) {
// - mainStatus(event, status)
// status (string) : Status id (connected, waiting, ...)
// appData properties:
//
// - language (string): ISO language code of active language
// appData
return [function() {
@ -44,6 +48,7 @@ define(["jquery"], function($) { @@ -44,6 +48,7 @@ define(["jquery"], function($) {
data: null,
e: $({})
}
var html = document.getElementsByTagName("html")[0];
var appData = {
get: function() {
return data.data;
@ -52,7 +57,8 @@ define(["jquery"], function($) { @@ -52,7 +57,8 @@ define(["jquery"], function($) {
data.data = d;
return d;
},
e: data.e
e: data.e,
language: html.getAttribute("lang")
}
return appData;

Loading…
Cancel
Save