summaryrefslogtreecommitdiffstats
path: root/lib/l10n.php
diff options
context:
space:
mode:
authorAndreasErgenzinger <andreas.ergenzinger@gmx.de>2013-04-17 10:29:32 +0200
committerAndreasErgenzinger <andreas.ergenzinger@gmx.de>2013-04-17 10:29:32 +0200
commit6a5f5ce1579ed27649c8537bfdeb67e97f531289 (patch)
treee9bfef3394d2ae355f7abc439439c11f06df65ba /lib/l10n.php
parentf3c06ae4e41521f5f2439300f6ecb263cd9786ed (diff)
downloadnextcloud-server-6a5f5ce1579ed27649c8537bfdeb67e97f531289.tar.gz
nextcloud-server-6a5f5ce1579ed27649c8537bfdeb67e97f531289.zip
merge translations with those from theme
Diffstat (limited to 'lib/l10n.php')
-rw-r--r--lib/l10n.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/l10n.php b/lib/l10n.php
index 315e326b292..7aef653ef79 100644
--- a/lib/l10n.php
+++ b/lib/l10n.php
@@ -125,6 +125,15 @@ class OC_L10N{
include strip_tags($i18ndir).strip_tags($lang).'.php';
if(isset($TRANSLATIONS) && is_array($TRANSLATIONS)) {
$this->translations = $TRANSLATIONS;
+ //merge with translations from theme
+ $theme = OC_Config::getValue( "theme" );
+ if (!is_null($theme)) {
+ $transFile = OC::$SERVERROOT.'/themes/'.$theme.substr($transFile, strlen(OC::$SERVERROOT));
+ if (file_exists($transFile)) {
+ include $transFile;
+ $this->translations = array_merge($this->translations, $TRANSLATIONS);
+ }
+ }
}
}