PHP money_format to Swiss Currency
In my PHP file, I have this code:
setlocale(LC_MONETARY, 'de_CH');
and further down:
money_format('%.2n')
My local site adjusts correctly according to my "setLocal"-setting, but on the remote site on my linode, I keep getting the $-sign instead of € or Fr. (for Switzerland), no matter what.
How do I get the correct currency to show?
1 Reply
mcintosh
Linode Staff
This seems to suggest you don't have the locale for de_CH
installed on the Linode, which would be necessary to reference it in PHP code.
If you run locale -a
, you should be able to determine if the corresponding locale is installed.
If it's not installed, running /usr/share/locales/install-language-pack de_CH
(this might vary depending on your system - reply if it doesn't work) should get you up and running.