Skip to content

Commit d0fd14b

Browse files
committed
Add a versionadded directive
1 parent 28a86fb commit d0fd14b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

translation.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -979,8 +979,14 @@ preferences. This is achieved with the ``getPreferredLanguage()`` method of the
979979

980980
Symfony finds the best possible language based on the locales passed as argument
981981
and the value of the ``Accept-Language`` HTTP header. If it can't find a perfect
982-
match between them, this method returns the first locale passed as argument
983-
(that's why the order of the passed locales is important).
982+
match between them, Symfony will try to find a partial match based on the language
983+
(e.g. ``fr_CA`` would match ``fr_Latn_CH`` because their language is the same).
984+
If there's no perfect or partial match, this method returns the first locale passed
985+
as argument (that's why the order of the passed locales is important).
986+
987+
.. versionadded:: 7.1
988+
989+
The feature to match lcoales partially was introduced in Symfony 7.1.
984990

985991
.. _translation-fallback:
986992

0 commit comments

Comments
 (0)