Hello,
I'm trying to add multi-lang support on php:7.0/apache, but my text are never translate.
This is my Dockerfile, that extends the official image :
FROM php:7-apache
RUN apt-get update
# Set locales
RUN apt-get install locales
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
RUN echo "fr_FR.UTF-8 UTF-8" >> /etc/locale.gen
RUN echo "en_GB.UTF-8 UTF-8" >> /etc/locale.gen
RUN echo "it_IT.UTF-8 UTF-8" >> /etc/locale.gen
# Setting up server
RUN apt-get install -y zlib1g-dev libicu-dev g++ libpq-dev libssl-dev gettext && \
docker-php-ext-configure intl && \
docker-php-ext-install intl
RUN docker-php-ext-install gettext
RUN docker-php-ext-install pdo_pgsql
RUN a2enmod rewrite
RUN pecl install mongodb-1.1.8 \
&& docker-php-ext-enable mongodb
RUN echo extension=mongo.so > /usr/local/etc/php/conf.d/mongo.ini
RUN echo extension=gettext.so > /usr/local/etc/php/conf.d/gettext.ini
COPY ./webapp /var/www/html/
Have I missed something ?
Have a good coding day 馃惢
PS : This method (approximatively) works when I previously using PHP 5 from Debian Repo (same without Docker)
It looks like you might be missing a RUN locale-gen just after the echo lines. :smile_cat:
So simply ... thank you @yosifkit :)
Have a good day !
Most helpful comment
It looks like you might be missing a
RUN locale-genjust after the echo lines. :smile_cat: