Skip to content

Commit 33ba508

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: [#12861] Tweak translation articles for 4.3 component changes
2 parents 7e88858 + c0f9bfa commit 33ba508

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

translation.rst

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -503,15 +503,19 @@ to learn more about how to handle it.
503503
Fallback Translation Locales
504504
----------------------------
505505

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

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

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

516520
#. If the translation still isn't found, Symfony uses the ``fallbacks`` option,
517521
which can be configured as follows:
@@ -613,7 +617,6 @@ Learn more
613617
.. _`i18n`: https://en.wikipedia.org/wiki/Internationalization_and_localization
614618
.. _`ICU MessageFormat`: http://userguide.icu-project.org/formatparse/messages
615619
.. _`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
617620
.. _`ISO 639-1`: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
618621
.. _`Translatable Extension`: http://atlantic18.github.io/DoctrineExtensions/doc/translatable.html
619622
.. _`Translatable Behavior`: https://github.com/KnpLabs/DoctrineBehaviors

translation/xliff.rst

Lines changed: 1 addition & 1 deletion
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)