Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 0e1f9db

Browse files
committed
Merge pull request #720 from liquorvicar/add_default_locale_setting
Adds docs for default_locale config option
2 parents 331a666 + 873968c commit 0e1f9db

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

bundles/phpcr_odm/multilang.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ To use translated documents, you need to configure the available languages:
2525
de: [en, fr]
2626
fr: [en, de]
2727
locale_fallback: hardcoded
28+
default_locale: fr
2829
2930
.. code-block:: xml
3031
@@ -50,6 +51,8 @@ To use translated documents, you need to configure the available languages:
5051
<fallback>en</fallback>
5152
<fallback>de</fallback>
5253
</locale>
54+
55+
<default_locale>fr</default_locale>
5356
</odm>
5457
</config>
5558
</container>
@@ -66,13 +69,17 @@ To use translated documents, you need to configure the available languages:
6669
'fr' => array('en', 'de'),
6770
),
6871
'locale_fallback' => 'hardcoded',
72+
'default_locale' => 'fr',
6973
)
7074
);
7175
7276
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.
7683

7784
This bundle provides a request listener that gets activated when any locales
7885
are configured. This listener updates PHPCR-ODM to use the locale Symfony

0 commit comments

Comments
 (0)