File tree Expand file tree Collapse file tree
DOCUMENTATION/content/documentation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1500,6 +1500,13 @@ To add locales to the container:
15001500
150115014 - Check enabled locales with `docker-compose exec php-fpm locale -a`
15021502
1503+ Update the locale setting, default is `POSIX`
1504+
1505+ 1 - Open the `.env` file and set `PHP_FPM_DEFAULT_LOCALE` to `en_US.UTF8` or other locale you want.
1506+
1507+ 2 - Re-build your PHP-FPM Container `docker-compose build php-fpm`.
1508+
1509+ 3 - Check the default locale with `docker-compose exec php-fpm locale`
15031510
15041511
15051512<br>
Original file line number Diff line number Diff line change @@ -212,6 +212,7 @@ services:
212212 - INSTALL_XHPROF=${PHP_FPM_INSTALL_XHPROF}
213213 - PUID=${PHP_FPM_PUID}
214214 - PGID=${PHP_FPM_PGID}
215+ - LOCALE=${PHP_FPM_DEFAULT_LOCALE}
215216 - http_proxy
216217 - https_proxy
217218 - no_proxy
Original file line number Diff line number Diff line change @@ -206,6 +206,7 @@ PHP_FPM_INSTALL_SSHPASS=false
206206PHP_FPM_INSTALL_MAILPARSE=false
207207PHP_FPM_FFMPEG=false
208208PHP_FPM_ADDITIONAL_LOCALES="es_ES.UTF-8 fr_FR.UTF-8"
209+ PHP_FPM_DEFAULT_LOCALE=POSIX
209210
210211PHP_FPM_PUID=1000
211212PHP_FPM_PGID=1000
Original file line number Diff line number Diff line change @@ -835,6 +835,10 @@ RUN if [ ${INSTALL_FAKETIME} = true ]; then \
835835 echo "/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1" > /etc/ld.so.preload \
836836;fi
837837
838+ # Configure locale.
839+ ARG LOCALE=POSIX
840+ ENV LC_ALL ${LOCALE}
841+
838842WORKDIR /var/www
839843
840844CMD ["php-fpm" ]
You can’t perform that action at this time.
0 commit comments