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

locale support #24

Open
nvdk opened this issue Feb 26, 2021 · 0 comments
Open

locale support #24

nvdk opened this issue Feb 26, 2021 · 0 comments
Labels
Q&A Questions and answers; tips for other users.

Comments

@nvdk
Copy link
Member

nvdk commented Feb 26, 2021

Unfortunately the alpine base image does not support different locales and for some projects we do have a need of localizing date formats. Currently it seems using musl-locale seems the most straightforward way to support this.

I'm creating this issue so it's easier to find a solution for people running into the same thing + perhaps consider adding musl_locale to the base javascript template?

See also https://grrr.tech/posts/2020/add-locales-to-alpine-linux-docker-image/

For basic locale support, add the following to your docker file

ENV MUSL_LOCALE_DEPS cmake make musl-dev gcc gettext-dev libintl 
ENV MUSL_LOCPATH /usr/share/i18n/locales/musl

RUN apk add --no-cache \
    $MUSL_LOCALE_DEPS \
    && wget https://gitlab.com/rilian-la-te/musl-locales/-/archive/master/musl-locales-master.zip \
    && unzip musl-locales-master.zip \
      && cd musl-locales-master \
      && cmake -DLOCALE_PROFILE=OFF -D CMAKE_INSTALL_PREFIX:PATH=/usr . && make && make install \
      && cd .. && rm -r musl-locales-master
@madnificent madnificent added the Q&A Questions and answers; tips for other users. label Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Q&A Questions and answers; tips for other users.
Projects
None yet
Development

No branches or pull requests

2 participants