@@ -504,15 +504,19 @@ to learn more about how to handle it.
504
504
Fallback Translation Locales
505
505
----------------------------
506
506
507
- Imagine that the user's locale is ``fr_FR `` and that you're translating the
508
- key ``Symfony is great ``. To find the French translation, Symfony actually
507
+ Imagine that the user's locale is ``es_AR `` and that you're translating the
508
+ key ``Symfony is great ``. To find the Spanish translation, Symfony actually
509
509
checks translation resources for several locales:
510
510
511
- #. First, Symfony looks for the translation in a ``fr_FR `` translation resource
512
- (e.g. ``messages.fr_FR.xlf ``);
511
+ #. First, Symfony looks for the translation in a ``es_AR `` (Argentinean
512
+ Spanish) translation resource (e.g. ``messages.es_AR.yaml ``);
513
513
514
- #. If it wasn't found, Symfony looks for the translation in a ``fr `` translation
515
- resource (e.g. ``messages.fr.xlf ``);
514
+ #. If it wasn't found, Symfony looks for the translation in the
515
+ parent locale, which is automatically defined only for some locales. In
516
+ this example, the parent locale is ``es_419 `` (Latin American Spanish);
517
+
518
+ #. If it wasn't found, Symfony looks for the translation in a ``es ``
519
+ (Spanish) translation resource (e.g. ``messages.es.yaml ``);
516
520
517
521
#. If the translation still isn't found, Symfony uses the ``fallbacks `` configuration
518
522
parameter, which defaults to ``en `` (see `Configuration `_).
@@ -570,7 +574,6 @@ Learn more
570
574
.. _`i18n` : https://en.wikipedia.org/wiki/Internationalization_and_localization
571
575
.. _`ICU MessageFormat` : http://userguide.icu-project.org/formatparse/messages
572
576
.. _`ISO 3166-1 alpha-2` : https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
573
- .. _`ISO 31-11` : https://en.wikipedia.org/wiki/Interval_(mathematics)#Notations_for_intervals
574
577
.. _`ISO 639-1` : https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
575
578
.. _`Translatable Extension` : http://atlantic18.github.io/DoctrineExtensions/doc/translatable.html
576
579
.. _`Translatable Behavior` : https://github.com/KnpLabs/DoctrineBehaviors
0 commit comments