-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Update translator fallback example to include ICU parents #10122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
javiereguiluz
merged 2 commits into
symfony:master
from
thewilkybarkid:icu-parent-locales
Sep 4, 2018
Merged
Update translator fallback example to include ICU parents #10122
javiereguiluz
merged 2 commits into
symfony:master
from
thewilkybarkid:icu-parent-locales
Sep 4, 2018
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
symfony-splitter
pushed a commit
to symfony/translation
that referenced
this pull request
Aug 28, 2018
…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 ------- e0f402fc29 [Translator] Use ICU parent locales as fallback locales
symfony-splitter
pushed a commit
to symfony/intl
that referenced
this pull request
Aug 28, 2018
…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 ------- e0f402fc29 [Translator] Use ICU parent locales as fallback locales
fabpot
added a commit
to symfony/symfony
that referenced
this pull request
Aug 28, 2018
…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
@thewilkybarkid a very nice feature! Thanks for contributing it, including the doc update! |
javiereguiluz
added a commit
that referenced
this pull request
Sep 4, 2018
…s (thewilkybarkid, javiereguiluz) This PR was merged into the master branch. Discussion ---------- Update translator fallback example to include ICU parents Changes the example to show symfony/symfony#28070. Commits ------- 7ccf603 Reworded and added the versionadded directive 54631df Update translator fallback example to include ICU parents
SerhiyMytrovtsiy
added a commit
to SerhiyMytrovtsiy/translation
that referenced
this pull request
Oct 19, 2022
…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 ------- e0f402fc29 [Translator] Use ICU parent locales as fallback locales
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes the example to show symfony/symfony#28070.