user3733648 user3733648 - 1 year ago 96
MySQL Question

PHP language based setting

I am creating a MySQL + PHP script where user can configure lanuage based formates


delimiter: ,
currency: €
locale: de

Is there any standard available for such configurations?

Answer Source

If you mean already built-in in php, yes there is a standard available. It works with locales. You can use the setlocale() function, to set the current locale, which has an impact on different php functions, like strftime(). Get a closer look here.

But be warned. The output is not always what you would expect, because it is not ISO compliant. There has been a long discussion about the locales and their impact on date functions, but in the end they decided to stay POSIX compliant, which is not ISO compliant.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download