Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
error related to i18n
  • I've been looking at the log file to cleaning up calling the deprecated methods from my Fuel app, so far the only one remain which I have no idea how to fix it or what to do with it. "Fuel\Core\Fuel::init - The configured locale en_EN is not installed on your system." I've look up the code in the Fuel::init method and I think that I must have missed something in php.ini or apache config, but I don't know which! Even though, my code runs perfectly, but it's quite annoying for me knowing that something's wrong and don't know how to fix it. I hope someone can help me on this or point me to the way to fix it. By the way, I'm running Fuel using WAMP on Win7.
  • The locale FuelPHP uses is configured in config/config.php, and set using the set_locale() function. It is used for proper configuration of the decimal point, currency, etc. For a locale to work your operating system needs to support it, as that is where is it defined. Clearly Windows doesn't support en_EN. Did you set this, I never heard of this locale? Try en_US or en_GB. Or just 'en'.
  • Thanks @WanWizard. Sorry, it is my typo-mistake. The actual log is actually en_US. "Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system." Is that mean Windows does not support locale in php? I never try it on linux machine before
    so I'm not sure whether this warning will occur or not. Besides from my typo-mistake,
    can you please suggest how should I fix this? I'm not sure if any body has notice this on their Windows machine running FuelPHP
    using WAMP.
  • On Windows, you can set the locale to "" (empty string), which will cause setlocale() to use the locale settings defined in your controlpanel (= regional settings). You can find a list of locales supported by Windows on this page: http://msdn.microsoft.com/en-us/library/39cwe7zf(vs.71).aspx
  • Well, that seems to do the trick! Setting locale in the config.php to empty string does work.
    I no longer have the warning log. Thank you very much, WanWizard. I still have a lot to learn. :)
  • For what it's worth, I got this error on my production server (running Debian Linux and PHP 5.4.2). I tried en_US, en_AU and just en, but they all threw this error. Setting it to blank worked (and I assume should use the system locale - Which is en_AU)
  • That is weird, if the system locale is en_AU, it clearly must be installed. On some systems ( I'm on a Redhat OS, using "en_US" ), the locale is defined as "en_US.utf8". Maybe that is the case here as well. Do an "echo $LANG" on the commandline to check.
  • I've been wondering about this issue for some time, but it was more annoying than anything else. Thanks for the post and answer Harro. My system was set to en_US.UTF-8 for the local so using that string instead of just en_US worked for me.
  • I know thats an old issue, but for everybody comes to this post over search ;):

    For Windows (7) the correct values are "english" or "german" (see working link: http://msdn.microsoft.com/en-us/library/39cwe7zf(v=vs.100).aspx).

    For Ubuntu Server you should use en_US.UTF-8 or something like this (as mentioned by michael_bender). You can find out your installed local with the command-line command: "locale -a"

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion