File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -979,8 +979,14 @@ preferences. This is achieved with the ``getPreferredLanguage()`` method of the
979979
980980Symfony finds the best possible language based on the locales passed as argument
981981and 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
You can’t perform that action at this time.
0 commit comments