Skip to content

Commit c9b92b3

Browse files
committed
[FrameworkBundle] Update the enabled_locales description
1 parent 85268b4 commit c9b92b3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

reference/configuration/framework.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,9 +428,11 @@ performance a bit:
428428
$framework->enabledLocales(['en', 'es']);
429429
};
430430
431-
If some user makes requests with a locale not included in this option, the
432-
application won't display any error because Symfony will display contents using
433-
the fallback locale.
431+
An added bonus of defining the enabled locales is that they are automatically
432+
added as a requirement of the :ref:`special _locale parameter <routing-locale-parameter>`.
433+
For example, if you define this value as ``['ar', 'he', 'ja', 'zh']``, the
434+
``_locale`` routing parameter will have an ``ar|he|ja|zh`` requirement. If some
435+
user makes requests with a locale not included in this option, they'll see an error.
434436

435437
set_content_language_from_locale
436438
................................

0 commit comments

Comments
 (0)