mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
merge translations with those from theme
This commit is contained in:
parent
f3c06ae4e4
commit
6a5f5ce157
1 changed files with 9 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue