@@ -25,6 +25,7 @@ To use translated documents, you need to configure the available languages:
25
25
de : [en, fr]
26
26
fr : [en, de]
27
27
locale_fallback : hardcoded
28
+ default_locale : fr
28
29
29
30
.. code-block :: xml
30
31
@@ -50,6 +51,8 @@ To use translated documents, you need to configure the available languages:
50
51
<fallback >en</fallback >
51
52
<fallback >de</fallback >
52
53
</locale >
54
+
55
+ <default_locale >fr</default_locale >
53
56
</odm >
54
57
</config >
55
58
</container >
@@ -66,13 +69,17 @@ To use translated documents, you need to configure the available languages:
66
69
'fr' => array('en', 'de'),
67
70
),
68
71
'locale_fallback' => 'hardcoded',
72
+ 'default_locale' => 'fr',
69
73
)
70
74
);
71
75
72
76
The ``locales `` is a list of alternative locales to look up if a document
73
- is not translated to the requested locale. Note that the first locale listed
74
- is used as the default locale for the standard locale chooser strategy and
75
- hence will be the default locale in the document manager.
77
+ is not translated to the requested locale.
78
+
79
+ The default locale is used for the standard locale chooser strategy and
80
+ hence will be the default locale in the document manager. Specifying the
81
+ default locale is optional. If you do not specify a default locale then the
82
+ first locale listed is used as the default locale.
76
83
77
84
This bundle provides a request listener that gets activated when any locales
78
85
are configured. This listener updates PHPCR-ODM to use the locale Symfony
0 commit comments