Cannot add a custom locale via config/locales
if PHP intl extension is installed.
#8924
Replies: 4 comments 6 replies
-
Marked this as an enhancement request as this currently works by design. The Intl extension is supposed to provide an exhaustive list of recognized locales |
Beta Was this translation helpful? Give feedback.
-
I've got a problem with I also received |
Beta Was this translation helpful? Give feedback.
-
I don't really understand why this is an option in Craft if it doesn't work? Intl extension is installed and it doesn't work, and i also added a config file in to /config/locales/ and still get the same error:
|
Beta Was this translation helpful? Give feedback.
-
Checking in here to see if you can help me adding a non-standard locale? E.g. en-FR (english speakers in France). Tried using: (Use case: for hreflang links between regions) |
Beta Was this translation helpful? Give feedback.
-
Description
I want to add some custom locales that are not included in PHP's list generated by the intl extension. These reflect the languages available under Settings > Sites > [choose site] > Language. When the intl extension is not installed, you can add custom locales in
config/locales
and they successfully appear, but when it is installed, you cannot add to the ones generated by the extension.Steps to reproduce
config/locales
that doesn't exist in PHP's intl list such asen-ID.php
(English Indonesia)Invalid language: en-id in craftcms/cms/src/helpers/Localization.php:44
Additional info
Beta Was this translation helpful? Give feedback.
All reactions