Skip to content

Commit c0f9bfa

Browse files
committed
[symfony#12861] Tweak translation articles for 4.3 component changes
1 parent f270773 commit c0f9bfa

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

translation.rst

+10-7
Original file line numberDiff line numberDiff line change
@@ -504,15 +504,19 @@ to learn more about how to handle it.
504504
Fallback Translation Locales
505505
----------------------------
506506

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
509509
checks translation resources for several locales:
510510

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``);
513513

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``);
516520

517521
#. If the translation still isn't found, Symfony uses the ``fallbacks`` configuration
518522
parameter, which defaults to ``en`` (see `Configuration`_).
@@ -570,7 +574,6 @@ Learn more
570574
.. _`i18n`: https://en.wikipedia.org/wiki/Internationalization_and_localization
571575
.. _`ICU MessageFormat`: http://userguide.icu-project.org/formatparse/messages
572576
.. _`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
574577
.. _`ISO 639-1`: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
575578
.. _`Translatable Extension`: http://atlantic18.github.io/DoctrineExtensions/doc/translatable.html
576579
.. _`Translatable Behavior`: https://github.com/KnpLabs/DoctrineBehaviors

translation/xliff.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ loaded/dumped inside a Symfony application:
2727
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.1" version="2.1"
2828
srcLang="fr-FR" trgLang="en-US">
2929
<file id="messages.en_US">
30-
<unit id="LCa0a2j">
30+
<unit id="LCa0a2j" name="original-content">
3131
<notes>
3232
<note category="state">new</note>
3333
<note category="approved">true</note>

0 commit comments

Comments
 (0)