mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Fix issue with language files not being included
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64471 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c45ef338d2
commit
6fe79bc1c6
@ -1042,10 +1042,11 @@ class i18n extends Object {
|
||||
*/
|
||||
static function include_by_class($class) {
|
||||
$module = self::get_owner_module($class);
|
||||
|
||||
if(!$module) user_error("i18n::include_by_class: Class {$class} not found", E_USER_WARNING);
|
||||
|
||||
if (file_exists($file = Director::getAbsFile("$module/lang/". self::get_locale() . '.php'))) {
|
||||
include_once($file);
|
||||
include($file);
|
||||
} else if (self::get_locale() != self::$default_locale) {
|
||||
$old = self::get_locale();
|
||||
self::set_locale(self::$default_locale);
|
||||
|
Loading…
Reference in New Issue
Block a user