You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the xx_XX format instead of xx, because I might want to create separate versions for en_US and en_GB later. This format is commonly used in computing environments to adapt software to the user's linguistic, cultural, and regional preferences. It can influence the formatting of dates, numbers, currency, and more, as well as the language used for text display in user interfaces.
Unfortunately, this doesn't allow for locales like en being detected. In this case, the default (de_DE) is used.
I'm also relying on strict_match, because my application only supports the defined locales.
My request is the following:
If there is no exact mapping available, match only the first part.
// Not match foundif (strpos($locale, '_') !== false) {
$newLocale = explode('_', $locale)[0];
// Retry with $newLocale
}
** Another solution would be:**
Add a map of locales, which can serve as a mapping. For example:
lunetics_locale:
...locale_mapping:
de: de_DEen: en_US
This would allow en and en_XX being redirected to en_US.
The text was updated successfully, but these errors were encountered:
I have my locales configured as follows:
I'm using the
xx_XX
format instead ofxx
, because I might want to create separate versions foren_US
anden_GB
later. This format is commonly used in computing environments to adapt software to the user's linguistic, cultural, and regional preferences. It can influence the formatting of dates, numbers, currency, and more, as well as the language used for text display in user interfaces.Unfortunately, this doesn't allow for locales like
en
being detected. In this case, the default (de_DE
) is used.I'm also relying on
strict_match
, because my application only supports the defined locales.My request is the following:
If there is no exact mapping available, match only the first part.
** Another solution would be:**
Add a map of locales, which can serve as a mapping. For example:
This would allow
en
anden_XX
being redirected toen_US
.The text was updated successfully, but these errors were encountered: