Skip to content
Snippets Groups Projects
Commit dcbbca1f authored by Bart Visscher's avatar Bart Visscher
Browse files

Merge pull request #2972 from AndreasErgenzinger/master

Translations for themes
parents 05a0b453 eef1cf52
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment