Skip to content

Commit f5adf55

Browse files
committed
minor symfony#18417 Mention that default_locale is used as the default for framework.translator.fallbacks (mpdude)
This PR was merged into the 5.4 branch. Discussion ---------- Mention that `default_locale` is used as the default for `framework.translator.fallbacks` I consider this relevant, since the current wording suggests that `default_locale` is for setting the default `_locale` value in the `Request` only – but, in fact, this setting also makes its way into the translator configuration. Commits ------- dd12eb5 Mention that `default_locale` is used as the default for `framework.translator.fallbacks`
2 parents 71966c9 + dd12eb5 commit f5adf55

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

translation.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,9 @@ the framework:
943943
$framework->defaultLocale('en');
944944
};
945945
946+
This ``default_locale`` is also relevant for the translator, as we will see
947+
in the next section.
948+
946949
.. _translation-fallback:
947950

948951
Fallback Translation Locales
@@ -963,7 +966,8 @@ checks translation resources for several locales:
963966
(Spanish) translation resource (e.g. ``messages.es.yaml``);
964967

965968
#. If the translation still isn't found, Symfony uses the ``fallbacks`` option,
966-
which can be configured as follows:
969+
which can be configured as follows. When this option is not defined, it
970+
defaults to the ``default_locale`` setting mentioned in the previous section.
967971

968972
.. configuration-block::
969973

0 commit comments

Comments
 (0)