Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Locale problems on Windows
  • I was having a bug with FuelPHP on Windows with IIS about concerning the following snippet of code in the frameworks fuel.php file on line 177.
    setlocale(LC_ALL, static::$locale) or
        logger(\Fuel::L_WARNING, 'The configured locale '.static::$locale.' is not installed on your system.', __METHOD__);
    The official PHP documentation agrees with the FuelPHP implementation and configuration, and works like a charm on Linux, however on Windows that’s not the case.
    On Windows the documentation wants the local sting to use – instead of _.
    For example, the call
    setlocale( LC_ALL, "en-US" );
    Instead of :
    For example, the call
    setlocale( LC_ALL, "en_US" ); (As is configured in FuelPHP)
    I’m not sure if this is a Windows issue or just “my PC,” however if I configure my application with locale to en-US, then it works. Otherwise with the default FuelPHP configuration I get a nasty error. 
  • HarroHarro
    Accepted Answer
    So set the locale in your config?

    Windows uses non-standard locale strings, and Windows doesn't support UTF-8 in itself, so you'll always have to do something when working on Windows.

Howdy, Stranger!

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

In this Discussion