- edited description
Undefined offset 'locale'
Issue #2
resolved
The problem:
Notice: Undefined offset: locale in [...]\src\ModDev\PhalconLocale\PhalconLocale.php on line 101
And I just don't know how to fix it up.
Comments (5)
-
reporter -
repo owner You will need to have a 'locale' key in your Phalcon config setup:
return new \Phalcon\Config(array( // Other config options like application, database, etc 'locale' => array( 'localeBasedRedirect' => false, 'defaultLocale' => 'en_US', 'sessionKey' => 'applocale', 'doubleCheckBrowserDefaultLangs' => true, 'useGeoIP' => true, 'geoIPEdition' => GEOIP_COUNTRY_EDITION, 'availableLocales' => array( 'de', 'en_US', 'en', 'es_419', 'es_ES', 'es', 'fr_FR' ) ) ));
-
reporter I already have that key. Actually, there are two configuration arrays on my application. See:
$configurations = new Phalcon\Config\Adapter\Ini(__DIR__ . '/../app/configurations/general.ini'); return new Phalcon\Config([ 'locale' => [ 'localeBasedRedirect' => true, 'defaultLocale' => 'en-US', 'sessionKey' => 'applocale', 'doubleCheckBrowserDefaultLangs' => true, 'useGeoIP' => true, 'availableLocales' => [ 'pt', 'pt-BR', 'en', 'en-US' ] ] ]);
Am I wrong somewhere?
-
reporter Yes, I was wrong. I wrote
$configurations
instead of$localeConfigurations
onurlRedirect()
. See:ModDev\PhalconLocale\PhalconLocale::urlRedirect($di, $configurations);
-
reporter - changed status to resolved
- Log in to comment