Skip to content

Commit f04f620

Browse files
committed
Improve ISO code references
1 parent 68e5211 commit f04f620

File tree

6 files changed

+26
-15
lines changed

6 files changed

+26
-15
lines changed

book/translation.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ into the language of the user::
2222

2323
The term *locale* refers roughly to the user's language and country. It
2424
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`_
2727
*country* code (e.g. ``fr_FR`` for French/France) is recommended.
2828

2929
In this chapter, you'll learn how to use the Translation component in the
@@ -673,6 +673,6 @@ steps:
673673
be set on the user's session.
674674

675675
.. _`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
678678
.. _`Translatable Extension`: https://github.com/l3pp4rd/DoctrineExtensions

components/translation/introduction.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ The constructor of the ``Translator`` class needs one argument: The locale.
4545

4646
The term *locale* refers roughly to the user's language and country. It
4747
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`_
5050
*country* code (e.g. ``fr_FR`` for French/France) is recommended.
5151

5252
.. _component-translator-message-catalogs:
@@ -206,5 +206,5 @@ Usage
206206
Read how to use the Translation component in :doc:`/components/translation/usage`.
207207

208208
.. _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

reference/constraints/Country.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Country
22
=======
33

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.
55

66
+----------------+------------------------------------------------------------------------+
77
| Applies to | :ref:`property or method <validation-property-target>` |
@@ -81,3 +81,5 @@ message
8181
**type**: ``string`` **default**: ``This value is not a valid country.``
8282

8383
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

reference/constraints/Language.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Language
22
========
33

4-
Validates that a value is a valid language code.
4+
Validates that a value is a valid `ISO 639-1`_ language code.
55

66
+----------------+------------------------------------------------------------------------+
77
| Applies to | :ref:`property or method <validation-property-target>` |
@@ -81,3 +81,5 @@ message
8181
**type**: ``string`` **default**: ``This value is not a valid language.``
8282

8383
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

reference/constraints/Locale.rst

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Locale
33

44
Validates that a value is a valid locale.
55

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
77
(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).
99

1010
+----------------+------------------------------------------------------------------------+
1111
| Applies to | :ref:`property or method <validation-property-target>` |
@@ -85,3 +85,6 @@ message
8585
**type**: ``string`` **default**: ``This value is not a valid locale.``
8686

8787
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

reference/forms/types/locale.rst

+7-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ The ``locale`` type is a subset of the ``ChoiceType`` that allows the user
88
to select from a large list of locales (language+country). As an added bonus,
99
the locale names are displayed in the language of the user.
1010

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).
1415

1516
.. note::
1617

@@ -85,3 +86,6 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
8586
.. include:: /reference/forms/types/options/disabled.rst.inc
8687

8788
.. 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

0 commit comments

Comments
 (0)