mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Including template /lang folders in i18n::include_by_locale() (implementation started in r113919)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@114208 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
43c85e3c9a
commit
5236e09026
@ -1842,6 +1842,18 @@ class i18n extends Object {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load translations from themes
|
||||||
|
$themesBase = $base . '/themes';
|
||||||
|
foreach(scandir($themesBase) as $theme) {
|
||||||
|
if(
|
||||||
|
strpos($theme, SSViewer::current_theme()) === 0
|
||||||
|
&& file_exists($file = "$themesBase/$theme/lang/$locale.php")
|
||||||
|
) {
|
||||||
|
if ($force_load) include($file);
|
||||||
|
else include_once($file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Finally, load any translations from registered plugins
|
// Finally, load any translations from registered plugins
|
||||||
if ($load_plugins) self::plugins_load($locale);
|
if ($load_plugins) self::plugins_load($locale);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user