Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Setting up specific locale LC_NUMERIC
  • I would like to set LC_LOCALE to fr_FR and LC_NUMERIC to en_US, the only way I found is to add, after Fuel::init('config.php'); in bootstrap.php :
    setlocale(LC_NUMERIC, 'en_US.UTF8');
    Is there a specific configuration parameter for config.php to set LC_NUMERIC ?

    To explain a little, I did it because I'm working on a merchant website with lot of JavaScript to calculate prices and quantities, and the French notation is a problem with it. I think this is not a problem for visitors to read float numbers with a dot, but this is a bigger problem for me to call replace() over each number before calculations...
  • HarroHarro
    Accepted Answer
    No, there is no specific config for it.

    It's fine to do this in the app bootstrap, that's what it is there for.

Howdy, Stranger!

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

In this Discussion