-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alpine and locales problem #219
Comments
Hi @kusmierz you need to make your own Dockerfile that inherits from the alpine one and install libicu and php intl extension. I think you can close this issue too ;) |
doesn't help either. See also gliderlabs/docker-alpine#144 |
@kusmierz yes... you're right in fact... this is a bit disappointing, thanks for pointing that issue... I'm looking for a solution too as I will need it. |
@kusmierz BTW Why do you need localconv in fact? If you have to deal with number or currency formating, languages detection & various other
Your app can run independently of the |
This is not entirely true. What I was trying to do is to use zend-i18n component (CurrencyFormat Helper in fact). Internally it uses intl extension - mainly NumberFormatter class which is equivalent to numfmt_* functions + Locale class. So, your example is correct, and the ZF2 component works good (with intl extension), but this is not what I needed. I'm using localeconv() method to determine inter alia currency code to pass it as a default currency code to the CurrencyFormat Helper (basically something like So in short, I'd like to find currency code based on locale, which |
Here again you can do that with php+intl: echo (new NumberFormatter("de_DE", NumberFormatter::CURRENCY))->getSymbol(NumberFormatter::INTL_CURRENCY_SYMBOL);
// will output EUR
echo (new NumberFormatter("en_US", NumberFormatter::CURRENCY))->getSymbol(NumberFormatter::INTL_CURRENCY_SYMBOL);
// will output USD This mainly avoid you to So I guess this time you can close this issue ;) |
Hm, you're right. Thanks for the help and patience :) Closing now. |
Hello,
I'm using
php:X.X-[fpm-]alpine
image and can't uselocaleconv()
function.There is no
locale -a
,locale-gen
norlocaledef
, even directory/usr/share/locale/
...How could I make it work?
The text was updated successfully, but these errors were encountered: