File tree 6 files changed +26
-15
lines changed
6 files changed +26
-15
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ into the language of the user::
22
22
23
23
The term *locale * refers roughly to the user's language and country. It
24
24
can be any string that your application uses to manage translations and
25
- other format differences (e.g. currency format). The `ISO639 -1 `_
26
- *language * code, an underscore (``_ ``), then the `ISO3166 Alpha -2 `_
25
+ other format differences (e.g. currency format). The `ISO 639 -1 `_
26
+ *language * code, an underscore (``_ ``), then the `ISO 3166-1 alpha -2 `_
27
27
*country * code (e.g. ``fr_FR `` for French/France) is recommended.
28
28
29
29
In this chapter, you'll learn how to use the Translation component in the
@@ -673,6 +673,6 @@ steps:
673
673
be set on the user's session.
674
674
675
675
.. _`i18n` : http://en.wikipedia.org/wiki/Internationalization_and_localization
676
- .. _`ISO3166 Alpha -2` : http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
677
- .. _`ISO639 -1` : http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
676
+ .. _`ISO 3166-1 alpha -2` : http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
677
+ .. _`ISO 639 -1` : http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
678
678
.. _`Translatable Extension` : https://github.com/l3pp4rd/DoctrineExtensions
Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ The constructor of the ``Translator`` class needs one argument: The locale.
45
45
46
46
The term *locale * refers roughly to the user's language and country. It
47
47
can be any string that your application uses to manage translations and
48
- other format differences (e.g. currency format). The `ISO639 -1 `_
49
- *language * code, an underscore (``_ ``), then the `ISO3166 Alpha -2 `_
48
+ other format differences (e.g. currency format). The `ISO 639 -1 `_
49
+ *language * code, an underscore (``_ ``), then the `ISO 3166-1 alpha -2 `_
50
50
*country * code (e.g. ``fr_FR `` for French/France) is recommended.
51
51
52
52
.. _component-translator-message-catalogs :
@@ -206,5 +206,5 @@ Usage
206
206
Read how to use the Translation component in :doc: `/components/translation/usage `.
207
207
208
208
.. _Packagist : https://packagist.org/packages/symfony/translation
209
- .. _`ISO3166 Alpha -2` : http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
210
- .. _`ISO639 -1` : http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
209
+ .. _`ISO 3166-1 alpha -2` : http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
210
+ .. _`ISO 639 -1` : http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
Original file line number Diff line number Diff line change 1
1
Country
2
2
=======
3
3
4
- Validates that a value is a valid two-letter country code.
4
+ Validates that a value is a valid ` ISO 3166-1 alpha-2 `_ country code.
5
5
6
6
+----------------+------------------------------------------------------------------------+
7
7
| Applies to | :ref: `property or method <validation-property-target >` |
@@ -81,3 +81,5 @@ message
81
81
**type **: ``string `` **default **: ``This value is not a valid country. ``
82
82
83
83
This message is shown if the string is not a valid country code.
84
+
85
+ .. _`ISO 3166-1 alpha-2` : http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
Original file line number Diff line number Diff line change 1
1
Language
2
2
========
3
3
4
- Validates that a value is a valid language code.
4
+ Validates that a value is a valid ` ISO 639-1 `_ language code.
5
5
6
6
+----------------+------------------------------------------------------------------------+
7
7
| Applies to | :ref: `property or method <validation-property-target >` |
@@ -81,3 +81,5 @@ message
81
81
**type **: ``string `` **default **: ``This value is not a valid language. ``
82
82
83
83
This message is shown if the string is not a valid language code.
84
+
85
+ .. _`ISO 639-1` : http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
Original file line number Diff line number Diff line change 3
3
4
4
Validates that a value is a valid locale.
5
5
6
- The "value" for each locale is either the two letter ISO639-1 *language * code
6
+ The "value" for each locale is either the two letter ` ISO 639-1 `_ *language * code
7
7
(e.g. ``fr ``), or the language code followed by an underscore (``_ ``), then
8
- the ISO3166 *country * code (e.g. ``fr_FR `` for French/France).
8
+ the ` ISO 3166-1 alpha-2 `_ *country * code (e.g. ``fr_FR `` for French/France).
9
9
10
10
+----------------+------------------------------------------------------------------------+
11
11
| Applies to | :ref: `property or method <validation-property-target >` |
@@ -85,3 +85,6 @@ message
85
85
**type **: ``string `` **default **: ``This value is not a valid locale. ``
86
86
87
87
This message is shown if the string is not a valid locale.
88
+
89
+ .. _`ISO 639-1` : http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
90
+ .. _`ISO 3166-1 alpha-2` : http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
Original file line number Diff line number Diff line change @@ -8,9 +8,10 @@ The ``locale`` type is a subset of the ``ChoiceType`` that allows the user
8
8
to select from a large list of locales (language+country). As an added bonus,
9
9
the locale names are displayed in the language of the user.
10
10
11
- The "value" for each locale is either the two letter ISO639-1 *language * code
12
- (e.g. ``fr ``), or the language code followed by an underscore (``_ ``), then
13
- the ISO3166 *country * code (e.g. ``fr_FR `` for French/France).
11
+ The "value" for each locale is either the two letter `ISO 639-1 `_ *language *
12
+ code (e.g. ``fr ``), or the language code followed by an underscore (``_ ``),
13
+ then the `ISO 3166-1 alpha-2 `_ *country * code (e.g. ``fr_FR ``
14
+ for French/France).
14
15
15
16
.. note ::
16
17
@@ -85,3 +86,6 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
85
86
.. include :: /reference/forms/types/options/disabled.rst.inc
86
87
87
88
.. include :: /reference/forms/types/options/mapped.rst.inc
89
+
90
+ .. _`ISO 639-1` : http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
91
+ .. _`ISO 3166-1 alpha-2` : http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
You can’t perform that action at this time.
0 commit comments