merge translations with those from theme

This commit is contained in:
AndreasErgenzinger 2013-04-17 10:29:32 +02:00
parent f3c06ae4e4
commit 6a5f5ce157

View file

@ -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);
}
}
}
}