From e72c08d98622a6eaa6a74684440af2226a3e225a Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Thu, 10 Jan 2008 21:48:03 +0000 Subject: [PATCH] Don't fail in i18n::include_by_class if the module isn't translatable git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47847 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/i18n.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/i18n.php b/core/i18n.php index b9b9d394c..a3fdf26b7 100755 --- a/core/i18n.php +++ b/core/i18n.php @@ -1259,7 +1259,7 @@ class i18n extends Controller { } else if (self::get_locale() != 'en_US') { self::set_locale('en_US'); self::include_by_class($class); - } else { + } else if(file_exists(Director::getAbsFile("$module/lang"))) { // Throw an error if the given module doesn't have translations if($module != project()) { user_error("i18n::include_by_class: Locale file $file should exist", E_USER_WARNING); @@ -1328,4 +1328,4 @@ class i18n extends Controller { } } -?> \ No newline at end of file +?>