|
3 | 3 |
|
4 | 4 | Validates that a value is a valid locale. |
5 | 5 |
|
6 | | -The "value" for each locale is any of `ICU format locale IDs`. By instance the two |
7 | | -letter `ISO 639-1`_ *language* code (e.g. ``fr``), or the language code followed |
8 | | -by an underscore (``_``), then the `ISO 3166-1 alpha-2`_ *country* code (e.g. ``fr_FR`` |
9 | | -for French/France). |
| 6 | +The "value" for each locale is any of `ICU format locale IDs`_. For example, the |
| 7 | +two letter `ISO 639-1`_ *language* code (e.g. ``fr``), or the language code |
| 8 | +followed by an underscore (``_``) and the `ISO 3166-1 alpha-2`_ *country* code |
| 9 | +(e.g. ``fr_FR`` for French/France). |
10 | 10 |
|
11 | 11 | +----------------+------------------------------------------------------------------------+ |
12 | 12 | | Applies to | :ref:`property or method <validation-property-target>` | |
@@ -103,12 +103,13 @@ canonicalize |
103 | 103 |
|
104 | 104 | .. versionadded:: 4.1 |
105 | 105 | Using this option with value ``false`` was deprecated in Symfony 4.1 and it |
106 | | - will throw an exception in Symfony 5.0, use `true` instead. |
| 106 | + will throw an exception in Symfony 5.0. Use ``true`` instead. |
107 | 107 |
|
108 | 108 | If true, the :phpmethod:`Locale::canonicalize` method will be applied before checking |
109 | 109 | the validity of the given locale (e.g. ``FR-fr.utf8`` is transformed into ``fr_FR`` |
110 | 110 | ). |
111 | 111 |
|
| 112 | +.. _`ICU format locale IDs`: http://userguide.icu-project.org/locale |
112 | 113 | .. _`ISO 639-1`: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes |
113 | 114 | .. _`ISO 3166-1 alpha-2`: https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes |
114 | 115 | .. _`ICU format locale IDs`: http://userguide.icu-project.org/locale#TOC-Canonicalization |
0 commit comments