merge translations with those from theme
This commit is contained in:
parent
6a5f5ce157
commit
7611d218df
1 changed files with 10 additions and 9 deletions
19
lib/l10n.php
19
lib/l10n.php
|
@ -122,18 +122,19 @@ 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;
|
||||
$this->translations = array_merge($this->translations, $TRANSLATIONS);
|
||||
}
|
||||
}
|
||||
$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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue