Skip to content
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

How I use locales in Alpine #144

Closed
yograterol opened this issue Feb 12, 2016 · 51 comments
Closed

How I use locales in Alpine #144

yograterol opened this issue Feb 12, 2016 · 51 comments

Comments

@yograterol
Copy link

We are migrating all docker images to Alpine base, but a software need set locales in the system but locales not found and I don't know how install locales command with this images.

locale -a or locale-gen

@andyshinn
Copy link
Contributor

Unfortunately, the musl libc locale system doesn't appear to be very complete at the moment. There is a little bit of information on it at http://www.openwall.com/lists/musl/2014/08/01/1. But there are no tools in Alpine to generate locales or set up the MUSL_LOCPATH variable. Some reference from Void Linux (also running musl libc) about no locale support at the moment at https://forum.voidlinux.eu/t/x86-64-musl-void-installer-cannot-set-locale/57.

Sorry :(

Referencing #102 as well.

@yograterol
Copy link
Author

Well, for this app I will use another distro :(

@ulope
Copy link

ulope commented Aug 22, 2016

Is there a reason that this was closed? It seems to me there is still no way to generate locales?

@rilian-la-te
Copy link

I wrote some simple tool with many bugs. It contains locale executable and template for generate MUSL locale files;
https://github.com/rilian-la-te/musl-locales

@aiphee
Copy link

aiphee commented Jun 20, 2017

So there is now no easy way to install locale (cs_CZ.utf8) in container? I would need it for my PHP application to print translated dates.

@rilian-la-te
Copy link

Install my tool, make a MO file for cs_CZ.utf8 (and make a PR).
Name it cs_CZ.utf8 and move to locale dir (configured at CMake).

And use cs_CZ.utf8 as LANG and LC_ALL.

@alextanhongpin
Copy link

I encountered the same issue too when using alpine:3.6. The following works for me.

In your Dockerfile:

FROM alpine:3.6

# ---not shown here---

# Install language pack
RUN apk --no-cache add ca-certificates wget && \
    wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub && \
    wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.25-r0/glibc-2.25-r0.apk && \
    wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.25-r0/glibc-bin-2.25-r0.apk && \
    wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.25-r0/glibc-i18n-2.25-r0.apk && \
    apk add glibc-bin-2.25-r0.apk glibc-i18n-2.25-r0.apk glibc-2.25-r0.apk

# Iterate through all locale and install it
# Note that locale -a is not available in alpine linux, use `/usr/glibc-compat/bin/locale -a` instead
COPY ./locale.md /locale.md
RUN cat locale.md | xargs -i /usr/glibc-compat/bin/localedef -i {} -f UTF-8 {}.UTF-8

# Set the lang, you can also specify it as as environment variable through docker-compose.yml
ENV LANG=en_US.UTF-8 \
    LANGUAGE=en_US.UTF-8

# --- not show here---

And this is how the locale.md looks like:

aa_DJ
aa_ER
aa_ET
af_ZA
am_ET
an_ES
ar_AE
ar_BH
ar_DZ
ar_EG
ar_IN
ar_IQ
ar_JO
ar_KW
ar_LB
ar_LY
ar_MA
ar_OM
ar_QA
ar_SA
ar_SD
ar_SY
ar_TN
ar_YE
as_IN
ast_ES
ayc_PE
az_AZ
be_BY
bem_ZM
ber_DZ
ber_MA
bg_BG
bho_IN
bn_BD
bn_IN
bo_CN
bo_IN
br_FR
brx_IN
bs_BA
byn_ER
ca_AD
ca_ES
ca_FR
ca_IT
crh_UA
csb_PL
cs_CZ
cv_RU
cy_GB
da_DK
de_AT
de_BE
de_CH
de_DE
de_LU
doi_IN
dv_MV
dz_BT
el_CY
el_GR
en_AG
en_AU
en_BW
en_CA
en_DK
en_GB
en_HK
en_IE
en_IN
en_NG
en_NZ
en_PH
en_SG
en_US
en_ZA
en_ZM
en_ZW
es_AR
es_BO
es_CL
es_CO
es_CR
es_CU
es_DO
es_EC
es_ES
es_GT
es_HN
es_MX
es_NI
es_PA
es_PE
es_PR
es_PY
es_SV
es_US
es_UY
es_VE
et_EE
eu_ES
fa_IR
ff_SN
fi_FI
fil_PH
fo_FO
fr_BE
fr_CA
fr_CH
fr_FR
fr_LU
fur_IT
fy_DE
fy_NL
ga_IE
gd_GB
gez_ER
gez_ET
gl_ES
gu_IN
gv_GB
ha_NG
he_IL
hi_IN
hne_IN
hr_HR
hsb_DE
ht_HT
hu_HU
hy_AM
ia_FR
id_ID
ig_NG
ik_CA
is_IS
it_CH
it_IT
iu_CA
iw_IL
ja_JP
ka_GE
kk_KZ
kl_GL
km_KH
kn_IN
kok_IN
ko_KR
ks_IN
ku_TR
kw_GB
ky_KG
lb_LU
lg_UG
li_BE
lij_IT
li_NL
lo_LA
lt_LT
lv_LV
mag_IN
mai_IN
mg_MG
mhr_RU
mi_NZ
mk_MK
ml_IN
mni_IN
mn_MN
mr_IN
ms_MY
mt_MT
my_MM
nb_NO
nds_DE
nds_NL
ne_NP
nhn_MX
niu_NU
niu_NZ
nl_AW
nl_BE
nl_NL
nn_NO
no_NO
nr_ZA
nso_ZA
oc_FR
om_ET
om_KE
or_IN
os_RU
pa_IN
pap_AN
pa_PK
pl_PL
ps_AF
pt_BR
pt_PT
ro_RO
ru_RU
ru_UA
rw_RW
sa_IN
sat_IN
sc_IT
sd_IN
se_NO
shs_CA
sid_ET
si_LK
sk_SK
sl_SI
so_DJ
so_ET
so_KE
so_SO
sq_AL
sq_MK
sr_ME
sr_RS
ss_ZA
st_ZA
sv_FI
sv_SE
sw_KE
sw_TZ
szl_PL
ta_IN
ta_LK
te_IN
tg_TJ
th_TH
ti_ER
ti_ET
tig_ER
tk_TM
tl_PH
tn_ZA
tr_CY
tr_TR
ts_ZA
tt_RU
ug_CN
uk_UA
unm_US
ur_IN
ur_PK
uz_UZ
ve_ZA
vi_VN
wa_BE
wae_CH
wal_ET
wo_SN
xh_ZA
yi_US
yo_NG
yue_HK
zh_CN
zh_HK
zh_SG
zh_TW
zu_ZA

The locale.md contains the list of locale I want to install in the alpine image. If you tried setting the LANG=zh_HK.UTF-8 and it doesn't work, it's because the locale is missing from the image.

@nicolasbuch
Copy link

I'm having some issues with localisation on alpine and i can see that i'm not the only one.

@alextanhongpin I've tried what you suggested. I can now do locale -a which outputs:

C
C.utf8
da_DK.utf8
de_DE.utf8
en_US.utf8
POSIX

But when trying to change the locale (php command setlocale) nothing changes. I have even tried modifying the ENV variable LC_ALL so that locale outputs:

LANG=
LC_CTYPE="da_DK.utf8"
LC_NUMERIC="da_DK.utf8"
LC_TIME="da_DK.utf8"
LC_COLLATE="da_DK.utf8"
LC_MONETARY="da_DK.utf8"
LC_MESSAGES="da_DK.utf8"
LC_PAPER="da_DK.utf8"
LC_NAME="da_DK.utf8"
LC_ADDRESS="da_DK.utf8"
LC_TELEPHONE="da_DK.utf8"
LC_MEASUREMENT="da_DK.utf8"
LC_IDENTIFICATION="da_DK.utf8"
LC_ALL=da_DK.utf8

(here i tried changing it to following; da_DK.utf8, da_DK, da_DK.utf-8, da_DK.UTF-8, da_DK.UTF8 with no luck)

Can anybody help? Is it even possible to make it work?

@rilian-la-te
Copy link

You try to using glibc locales in musl app, it is strange. Do you tried my workaround?

@nicolasbuch
Copy link

@rilian-la-te Yes i tried. Don't have cmake installed on my server. Tried on my mac as a proof of concept which resulted in some missing libraries which lead to a dead end. Might give it another try

@rilian-la-te
Copy link

Sorry, I do not know autotools. You need to have argp and libintl to build it in Alpine. I can switch to meson, if python is more acceptable.

@nicolasbuch
Copy link

Hi @rilian-la-te. I'm back at this problem. I successfully installed your tool but how do i generate the locale?

Install my tool, make a MO file for cs_CZ.utf8 (and make a PR).
Name it cs_CZ.utf8 and move to locale dir (configured at CMake).
And use cs_CZ.utf8 as LANG and LC_ALL.

How do i make a MO file for e.g. da_DK.utf8 and what is PR? Can you give a few hints :D?

@rilian-la-te
Copy link

PR is pull request. For making a MO file you need a PO file and gettext. PO file is a text file with MUSL localization. And you can use my musl-locales to get a locale program and auto install of PO (it will automatically makes it MO and install in right place and sets requiered environment variable)

@nicolasbuch
Copy link

PR is pull request.

lol 🤣. Okay makes sense. I ran your musl-locales and got this output:

Install the project...
-- Install configuration: ""
-- Installing: /usr/local/etc/profile.d/00locale.sh
-- Installing: /usr/local/bin/locale
-- Installing: /usr/local/share/locale/ch_DE/LC_MESSAGES/musl-locales.mo
-- Installing: /usr/local/share/locale/de_CH/LC_MESSAGES/musl-locales.mo
-- Installing: /usr/local/share/locale/en_US/LC_MESSAGES/musl-locales.mo
-- Installing: /usr/local/share/locale/ru_RU/LC_MESSAGES/musl-locales.mo
-- Installing: /usr/local/share/i18n/locales/musl/ch_DE.UTF-8
-- Installing: /usr/local/share/i18n/locales/musl/de_CH.UTF-8
-- Installing: /usr/local/share/i18n/locales/musl/en_US.UTF-8
-- Installing: /usr/local/share/i18n/locales/musl/ru_RU.UTF-8

This means that the following languages were installed: ch_DE.UTF-8, de_CH.UTF-8,en_US.UTF-8, ru_RU.UTF-8. Right?

When i try to setlocale to one of these locales, it does not work.

If i do /usr/local/bin/locale -a (to list all enabled locales) it only outputs:
C
C.UTF-8

I have tried setting the MUSL_LOCPATH env variable as the musl documentation states http://www.openwall.com/lists/musl/2014/08/01/1 with no luck...

Any ideas to what i'm doing wrong?

@rilian-la-te
Copy link

show me MUSL_LOCPATH

@nicolasbuch
Copy link

nicolasbuch commented Jan 31, 2018

show me MUSL_LOCPATH

usr/local/share/locale/

@rilian-la-te
Copy link

It should be /usr/local/share/i18n/locales/musl

@rilian-la-te
Copy link

set it so and try again
And you should really install 00locale.sh in correct location to get locales after reboot

@nicolasbuch
Copy link

It should be /usr/local/share/i18n/locales/musl

Tried setting it to /usr/local/share/i18n/locales/musl. Still no luck.

/usr/local/bin/locale -a also still outputs
C
C.UTF-8

Might just be an impossible task at this moment :(

@nicolasbuch
Copy link

Based on the musl-locales tool by @rilian-la-te, I created a simple example image showing how to use musl locales with docker-alpine. It creates a single docker layer weighting around 150 kb, while containing a few example locales. They mostly aren't full-blown localizations, but at least allow you to use localized time and date functions.

You can find it here: https://github.com/Auswaschbar/alpine-localized-docker

This is awesome, thanks!

I can see that locale -a only outputs

C.UTF-8
en_US.UTF-8
ch_DE.UTF-8
de_DE.UTF-8
ru_RU.UTF-8
de_CH.UTF-8
en_GB.UTF-8
fr_FR.UTF-8

What would it take to add more languages? Do we just need to push new .PO files to the https://gitlab.com/rilian-la-te/musl-locales repo?

@rilian-la-te
Copy link

Yes, just push it to me) And if you see untranslated strings, you just need to modify .pot file (it is handmade, not generated).

@Herz3h
Copy link

Herz3h commented Mar 20, 2019

Here is how I managed to install locales on alpine 3.9 (probably works on earlier versions too)

@curunoir
Copy link

Here is how I managed to install locales on alpine 3.9 (probably works on earlier versions too)

Hi I used this gist ton install it on php:7.2.19-fpm-alpine3.9 image.

Locales seem to be installed if I use usr/glibc-compat/bin/locale -a but they can't be used within php, strftime still returns english words even with setting setlocale() with another locale.

@Herz3h
Copy link

Herz3h commented Jun 25, 2019

@curunoir You're right, locales are installed, but php doesn't use them either. I'm trying to investigate why, will post back if I find anything.

I also tested: LC_ALL=fr_FR.UTF-8 date on the command line and it outputs english date. Problem is not php I guess.

EDIT: The gist I posted above does not seem to work. So I used rilian-la-te's solution above (has only following locales tho: ch_DE de_DE en_US fr_FR ru_RU, more can be added with a PR look above posts for more info).

Basically the steps are:

ENV MUSL_LOCPATH=/usr/local/share/i18n/locales/musl
RUN apk add --update git cmake make musl-dev gcc gettext-dev libintl
RUN cd /tmp && git clone https://gitlab.com/rilian-la-te/musl-locales.git
RUN cd /tmp/musl-locales && cmake . && make && make install

then using

/usr/local/bin/locale -a

To check for presence of the locales.

And to be sure it works, you can type: LANG=fr_FR.UTF-8 date

Edit: Replaced github link with gitlab instead which is more up to date.

@ktb83
Copy link

ktb83 commented Nov 13, 2019

@Herz3h I've been putting together an APKBUILD file for rilian-la-te's solution.

Although the locales appear to work with the date command in a terminal, have you been able to figure out why they do not work in PHP with setlocale?

ktb:~$ date +%A
Wednesday
ktb:~$ date +%B
November
ktb:~$ LANG=es_ES.UTF-8 date +%A
miercoles
ktb:~$ LANG=es_ES.UTF-8 date +%B
noviembre
ktb:~$ LC_ALL=es_ES.UTF-8 date +%A
miercoles
ktb:~$ LC_ALL=es_ES.UTF-8 date +%B
noviembre
<?php
setlocale(LC_ALL, 'es_ES.UTF-8');
echo 'setlocale(LC_ALL, 0): ' . setlocale(LC_ALL, 0) . '<br>';

echo 'strftime("%A"): ' . strftime('%A') . '<br>';
echo 'strftime("%B"): ' . strftime('%B') . '<br><br>';
?>

Output:

setlocale(LC_ALL, 0): es_ES.UTF-8
strftime("%A"): Wednesday
strftime("%B"): November

@rsanzante
Copy link

rsanzante commented Nov 16, 2019

From #144 (comment)

Basically the steps are:

ENV MUSL_LOCPATH=/usr/local/share/i18n/locales/musl
RUN apk add --update git cmake make musl-dev gcc gettext-dev libintl
RUN cd /tmp && git clone https://github.com/rilian-la-te/musl-locales.git
RUN cd /tmp/musl-locales && cmake . && make && make install

While this is not wrong, I suggest to clone project from GitLab instead of Github, because it seems more updated there. For example, Gitlab repository has es_ES support.

So use:

ENV MUSL_LOCPATH=/usr/local/share/i18n/locales/musl
RUN apk add --update git cmake make musl-dev gcc gettext-dev libintl
RUN cd /tmp && git clone https://gitlab.com/rilian-la-te/musl-locales.git
RUN cd /tmp/musl-locales && cmake . && make && make install

Edit: Linked comment was updated and now points to GitLab, so don't get confused if you see there the GitLab URL :)

@ktb83
Copy link

ktb83 commented Nov 16, 2019

You're also welcome to use this APKBUILD file to build packages locally. I hope to eventually have it included in Alpine's package repositories.

# Maintainer: KTB <ktb83dev@gmail.com>
pkgname=musl-locales
pkgver=8633379e
pkgrel=0
arch="all"
url="https://gitlab.com/rilian-la-te/musl-locales"
pkgdesc="Locales support for musl"
license="MIT AND LGPL-3.0-only"
makedepends="cmake make musl-dev gcc gettext-dev libintl"
subpackages="$pkgname-lang $pkgname-doc"
source="https://gitlab.com/rilian-la-te/$pkgname/-/archive/$pkgver/$pkgname-$pkgver.tar.gz"
options="!check" # no test suite/unit tests

build() {
	cmake . -DCMAKE_INSTALL_PREFIX=/usr
	make
}

package() {
	DESTDIR="$pkgdir" make install
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
	install -Dm644 LICENSE.MIT "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.MIT
}

sha512sums="a58db2e598b8e0edd960332b912d3c87d0e542f1e82958e826f74a68ab6d8d2fca4c7c75d4eb6745da867e882ff8395d6cb69226937bcfed9d1be3c36a2c416f  musl-locales-8633379e.tar.gz"

@ktb83
Copy link

ktb83 commented Nov 17, 2019

It looks like the IntlDateFormatter class from the PHP Intl extension can be used on Alpine which relies on ICU:

echo IntlDateFormatter::formatObject(
    new DateTime(), // DateTime object
    "eeee MMMM dd, yyyy '@' hh:mm:ss",  // ICU Date format
    'en_US'  // Locale
) . '<br>';

echo IntlDateFormatter::formatObject(
    new DateTime(), // DateTime object
    "eeee MMMM dd, yyyy '@' hh:mm:ss",  // ICU Date format
    'fr_FR'  // Locale
) . '<br>';

echo IntlDateFormatter::formatObject(
    new DateTime(), // DateTime object
    "eeee MMMM dd, yyyy '@' hh:mm:ss",  // ICU Date format
    'es_ES'  // Locale
) . '<br>';

Output:

Sunday November 17, 2019 @ 11:58:48
dimanche novembre 17, 2019 @ 11:58:48
domingo noviembre 17, 2019 @ 11:58:48

I just installed apache2 php7 php7-apache2 php7-intl and enabled the Intl extension in php.ini.
Screenshot_2019-11-17_07-31-39
Screenshot_2019-11-17_09-06-34
Firefox_Screenshot_2019-11-17T12-25-10 014Z

@edoeel
Copy link

edoeel commented Jan 4, 2020

@curunoir You're right, locales are installed, but php doesn't use them either. I'm trying to investigate why, will post back if I find anything.

I also tested: LC_ALL=fr_FR.UTF-8 date on the command line and it outputs english date. Problem is not php I guess.

Hi @Herz3h, do you have any update about your investigation?

@Herz3h
Copy link

Herz3h commented Jan 4, 2020

@edoardomistretta the steps I posted above (with musl) are the ones I currently use and it's working just fine.

@btd1337
Copy link

btd1337 commented May 18, 2020

This is my Postgres-Alpine locale:

Captura de tela de 2020-05-17 22-13-04

This is my Postgres db settings:

Captura de tela de 2020-05-17 22-14-35

Why my monetary values aren't in pt_BR format?

Captura de tela de 2020-05-17 22-16-36

The amounts should be as: R$ 100,00

What remains to be done for this to work?

@hoshsadiq
Copy link

For anyone else stumbling upon this, musl-libc doesn't support LC_MONETARY yet. It is on their roadmap with no target date.

@Renrhaf
Copy link

Renrhaf commented Apr 22, 2021

Works with #144 (comment).
Thanks @Herz3h, @rilian-la-te, @Auswaschbar <3

@williamdes
Copy link

Source: https://stackoverflow.com/a/63602822/5155484
This works fine:

apk --no-cache add \
    musl-locales \
    musl-locales-lang

@FedericoHeichou
Copy link

I suggest this one for PHP

ENV MUSL_LOCPATH="/usr/share/i18n/locales/musl"
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.13/community musl-locales musl-locales-lang \
    && cd "$MUSL_LOCPATH" \
    && for i in *.UTF-8; do cp -a "$i" "${i%%.UTF-8}"; done

It permits to run setlocale(LC_TIME, 'it_IT'); without .UTF-8 too

atweiden added a commit to atweiden/star that referenced this issue Aug 24, 2022
musl libc will eventually get better locale support [1]
- until then, a workaround is needed for `Locale` type checks on musl
  libc systems
  - *atweiden/voidvault* accomplished this by hard coding locales into
    a constant
    - but
      - this proved to be brittle and prone to breakage on glibc updates
  - implement new workaround: `scripts/fetch-locales.sh`
    - fetch pre-built locales from arch on demand
      - extract into `resources` directory
    - instruct musl users to use this script

see also [2][3]

[1]: https://wiki.musl-libc.org/roadmap.html
[2]: gliderlabs/docker-alpine#144
[3]: https://gist.github.com/Herz3h/0ffc2198cb63949a20ef61c1d2086cc0
@QGB
Copy link

QGB commented Sep 15, 2022

# apk add --no-cache locales locales-all
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  locales (missing):
    required by: world[locales]
  locales-all (missing):
    required by: world[locales-all]

@williamdes
Copy link

# apk add --no-cache locales locales-all
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  locales (missing):
    required by: world[locales]
  locales-all (missing):
    required by: world[locales-all]

https://grrr.tech/posts/2020/add-locales-to-alpine-linux-docker-image/
https://gist.github.com/alextanhongpin/aa55c082a47b9a1b0060a12d85ae7923

@FaimMedia
Copy link

Installing the icu-data-full package in Alpine (v3.17+) seems to do the trick to get it working with PHP:

FROM php:8.1-cli-alpine

ENV LC_ALL nl_NL.UTF-8
ENV LANG nl_NL.UTF-8

RUN apk update && apk add libintl icu icu-dev icu-data-full musl-locales musl-locales-lang

RUN docker-php-ext-install -j$(nproc) intl pcntl

RUN locale -a

RUN date

RUN cat /etc/os-release

RUN php -r "echo \\Locale::getDefault() . PHP_EOL;";
RUN php -r "echo (new \\IntlDateFormatter('nl_NL.UTF-8', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'Europe/Amsterdam'))->format(new \\DateTime()) . PHP_EOL;"

RUN php -r "print_r(\\ResourceBundle::getLocales(''));"

Last command gives me a list of 800+ locales.

@feeh27
Copy link

feeh27 commented Jun 24, 2023

Installing the icu-data-full package in Alpine (v3.17+) seems to do the trick to get it working with PHP:

FROM php:8.1-cli-alpine

ENV LC_ALL nl_NL.UTF-8
ENV LANG nl_NL.UTF-8

RUN apk update && apk add libintl icu icu-dev icu-data-full musl-locales musl-locales-lang

RUN docker-php-ext-install -j$(nproc) intl pcntl

RUN locale -a

RUN date

RUN cat /etc/os-release

RUN php -r "echo \\Locale::getDefault() . PHP_EOL;";
RUN php -r "echo (new \\IntlDateFormatter('nl_NL.UTF-8', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'Europe/Amsterdam'))->format(new \\DateTime()) . PHP_EOL;"

RUN php -r "print_r(\\ResourceBundle::getLocales(''));"

Last command gives me a list of 800+ locales.

Thanks @FaimMedia this works for me.

@marqu3s
Copy link

marqu3s commented Aug 24, 2023

This is my Postgres-Alpine locale:

None of the solutions I found worked for me.
Do you have a working solution for alpine:latest docker image that works for php?

@kohanax
Copy link

kohanax commented Jun 22, 2024

musl - current state

https://wiki.musl-libc.org/open-issues
Locale limitations
Locale support is very limited, and barely works. Translation of LC_TIME is not possible because the key strings for ABMON_5 and MON_5 (“May”) are identical. Custom collation orders (LC_COLLATE) are not implemented at all, despite there always having been an intent to support them. LC_NUMERIC and LC_MONETARY also admit no variation by locale. Solving these problems requires a major overhaul, but the main missing prerequisite is involvement from users who want the functionality.

firefly-iii/firefly-iii#2298

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests