aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-07-30 17:10:27 +0100
committerStruan Donald <struan@exo.org.uk>2013-07-30 17:10:27 +0100
commit70c2f1600ce356b745a3a8c792a8f4d4622185b7 (patch)
tree74d2388fd2e40b8b44687dc5c90704847af299f0 /src
parent450caa049f3e3588c741084a1a52015808a3f8fd (diff)
make template language a config option
Diffstat (limited to 'src')
-rw-r--r--src/js/app.js2
-rw-r--r--src/js/config.js-example3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/js/app.js b/src/js/app.js
index e463f75..00fc13a 100644
--- a/src/js/app.js
+++ b/src/js/app.js
@@ -13,7 +13,7 @@ var tpl = {
var loadTemplate = function (index) {
var name = names[index];
console.log('Loading template: ' + name + ', index: ' + index);
- $.get('templates/en/' + name + '.html', function (data) {
+ $.get('templates/' + CONFIG.LANGUAGE + '/' + name + '.html', function (data) {
that.templates[name] = data;
index++;
if (index < names.length) {
diff --git a/src/js/config.js-example b/src/js/config.js-example
index 92ce308..fd361d1 100644
--- a/src/js/config.js-example
+++ b/src/js/config.js-example
@@ -1,4 +1,7 @@
var CONFIG = {
+ // Language of templates to use ( should be name of directory under src/templates/ )
+ LANGUAGE: '',
+
// Name of app to use in alert dialog titles amongst other things
APP_NAME: '',