diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-05-03 05:41:28 -0700 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-05-03 05:41:28 -0700 |
commit | dcbbca1f894071839efcd30347e5e7c6689d707a (patch) | |
tree | b4c7346af5a6111489af989baf799e559c6f9a64 /lib | |
parent | 05a0b4533b079b50f013bdf511b45a9f8dcb976d (diff) | |
parent | eef1cf529ed03754798a2329fd29824be44cecda (diff) | |
download | nextcloud-server-dcbbca1f894071839efcd30347e5e7c6689d707a.tar.gz nextcloud-server-dcbbca1f894071839efcd30347e5e7c6689d707a.zip |
Merge pull request #2972 from AndreasErgenzinger/master
Translations for themes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/l10n.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/l10n.php b/lib/l10n.php index 315e326b292..d35ce5fed14 100644 --- a/lib/l10n.php +++ b/lib/l10n.php @@ -122,9 +122,21 @@ class OC_L10N{ ) && file_exists($i18ndir.$lang.'.php')) { // Include the file, save the data from $CONFIG - include strip_tags($i18ndir).strip_tags($lang).'.php'; + $transFile = strip_tags($i18ndir).strip_tags($lang).'.php'; + include $transFile; 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; + if (isset($TRANSLATIONS) && is_array($TRANSLATIONS)) { + $this->translations = array_merge($this->translations, $TRANSLATIONS); + } + } + } } } |