aboutsummaryrefslogtreecommitdiff
path: root/views/default/js/languages.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-07-28 03:34:59 +0200
committerSem <sembrestels@riseup.net>2012-07-28 03:34:59 +0200
commit4dd2ca9d54b64ebbf5eba3e3036f747cadb40825 (patch)
tree491f2f0ed93e707513d1f5c6edf2b55d2481a5c5 /views/default/js/languages.php
parent1e7b0a55af150794457b2ed77b30d4e4129325f3 (diff)
downloadelgg-4dd2ca9d54b64ebbf5eba3e3036f747cadb40825.tar.gz
elgg-4dd2ca9d54b64ebbf5eba3e3036f747cadb40825.tar.bz2
Fixes #4740. Added language fallback in javascript.
Diffstat (limited to 'views/default/js/languages.php')
-rw-r--r--views/default/js/languages.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/views/default/js/languages.php b/views/default/js/languages.php
index 009e8159c..c51d7bcb2 100644
--- a/views/default/js/languages.php
+++ b/views/default/js/languages.php
@@ -6,4 +6,10 @@ global $CONFIG;
$language = $vars['language'];
-echo json_encode($CONFIG->translations[$language]); \ No newline at end of file
+$translations = $CONFIG->translations['en'];
+
+if ($language != 'en') {
+ $translations = array_merge($translations, $CONFIG->translations[$language]);
+}
+
+echo json_encode($translations); \ No newline at end of file