summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-05-03 05:41:28 -0700
committerBart Visscher <bartv@thisnet.nl>2013-05-03 05:41:28 -0700
commitdcbbca1f894071839efcd30347e5e7c6689d707a (patch)
treeb4c7346af5a6111489af989baf799e559c6f9a64 /lib
parent05a0b4533b079b50f013bdf511b45a9f8dcb976d (diff)
parenteef1cf529ed03754798a2329fd29824be44cecda (diff)
downloadnextcloud-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.php14
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);
+ }
+ }
+ }
}
}