Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit357f10b

Browse files
committed
Merge pull requestsymfony#3249 from bicpi/improve_ISO_references
Improve ISO references
2 parents1851b19 +405f040 commit357f10b

File tree

6 files changed

+25
-15
lines changed

6 files changed

+25
-15
lines changed

‎book/translation.rst

Lines changed: 4 additions & 4 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Country
22
=======
33

4-
Validates that a value is a validtwo-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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
Language
22
========
33

4-
Validates that a value is a valid language code.
4+
Validates that a value is a valid language *Unicode language identifier*
5+
(e.g. ``fr`` or ``zh-Hant``).
56

67
+----------------+------------------------------------------------------------------------+
78
| Applies to|:ref:`property or method<validation-property-target>`|

‎reference/constraints/Locale.rst

Lines changed: 5 additions & 2 deletions
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 letterISO639-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-
theISO3166 *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

Lines changed: 7 additions & 3 deletions
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)

[8]ページ先頭

©2009-2025 Movatter.jp