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
The translator currently (when not setting one) falls back to the locale one level higher (eg en_JE to en). ICU contains data where the parent should be different (eg en_JE > en_GB > en_001 to en). Has using this data to produce a fall-back map been considered?
This relates to misd-service-development/phone-number-bundle#22, where I'd like to be able to use es_419 (Latin American Spanish) to save having to have separate translations for each of the 20 sub-locales (according to the ICU data).
The text was updated successfully, but these errors were encountered:
…s (thewilkybarkid)
This PR was squashed before being merged into the 4.2-dev branch (closes#28070).
Discussion
----------
[Translator] Use ICU parent locales as fallback locales
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12319
| License | MIT
| Doc PR | symfony/symfony-docs#10122
Currently the `Translator` fall backs based on the locale separator (eg `es_AR` to `es`), but the ICU data contains parent locales (eg `es_AR` is a child of `es_419`, as is `es_BO`, `es_EC` etc).
This makes use of the ICU data to add add in these fallbacks. This means the specific locales can be used, but the translations can stored in these groupings (eg `es_419` for Latin American Spanish), as well as adding other sensible fallbacks (eg Cape Verdean Portuguese to `pt_PT`).
Commits
-------
e0f402f [Translator] Use ICU parent locales as fallback locales
The translator currently (when not setting one) falls back to the locale one level higher (eg
en_JE
toen
). ICU contains data where the parent should be different (egen_JE
>en_GB
>en_001
toen
). Has using this data to produce a fall-back map been considered?This relates to misd-service-development/phone-number-bundle#22, where I'd like to be able to use
es_419
(Latin American Spanish) to save having to have separate translations for each of the 20 sub-locales (according to the ICU data).The text was updated successfully, but these errors were encountered: