diff --git a/CONTRIBUTORS b/CONTRIBUTORS index bb9af67..71a5f18 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1,2 +1,3 @@ Nicolas Lassale -Jürgen Hörmann - l10n improvements \ No newline at end of file +Jürgen Hörmann - l10n improvements +Hal Finkel \ No newline at end of file diff --git a/src/Pluf/Middleware/Translation.php b/src/Pluf/Middleware/Translation.php index 63438ad..8d5ce09 100644 --- a/src/Pluf/Middleware/Translation.php +++ b/src/Pluf/Middleware/Translation.php @@ -62,8 +62,9 @@ class Pluf_Middleware_Translation $GLOBALS['_PX_locale'] = array(); $GLOBALS['_PX_locale'][$lang] = array(); foreach (Pluf::f('installed_apps') as $app) { - $pofile = Pluf::fileExists($app.'/locale/'.$lang.'/'.strtolower($app).'.po'); - $GLOBALS['_PX_locale'][$lang] += Pluf_Translation::readPoFile($pofile); + if (false != ($pofile=Pluf::fileExists($app.'/locale/'.$lang.'/'.strtolower($app).'.po'))) { + $GLOBALS['_PX_locale'][$lang] += Pluf_Translation::readPoFile($pofile); + } } $request->language_code = $lang; return false;