PHOENIX-MEDIA / docker-nginx-php

Docker container for nginx + PHP FPM
GNU General Public License v3.0
5 stars 7 forks source link

PHP 8.1 can't retrieve system locales #1

Closed phoenix-bjoern closed 2 years ago

phoenix-bjoern commented 2 years ago

In PHP 8.1 the system locales are limited to English.

Test:

php -r "var_dump(\ResourceBundle::getLocales(''));"
array(4) {
  [0]=>
  string(2) "en"
  [1]=>
  string(6) "en_001"
  [2]=>
  string(5) "en_GB"
  [3]=>
  string(5) "en_US"
}

The output should have a complete list of locales.

phoenix-bjoern commented 2 years ago

In Alpine 3.16 there was a change in the icu-data package (see https://alpinelinux.org/posts/Alpine-3.16.0-released.html):

The ICU data has been split into icu-data-en (default) and icu-data-full packages. Users may need to install icu-data-full for non-English locales or legacy charset converters support.

So the icu-data-full has to be added.