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