@@ -22,7 +22,7 @@ Constructing the Translator
22
22
The main access point of the Translation Component is
23
23
:class: `Symfony\\ Component\\ Translation\\ Translator `. Before you can use it,
24
24
you need to configure it and load the messages to translate (called *message
25
- catalogues *).
25
+ catalogs *).
26
26
27
27
Configuration
28
28
~~~~~~~~~~~~~
@@ -49,42 +49,42 @@ The constructor of the ``Translator`` class needs one argument: The locale.
49
49
*language * code, an underscore (``_ ``), then the `ISO3166 Alpha-2 `_
50
50
*country * code (e.g. ``fr_FR `` for French/France) is recommended.
51
51
52
- Loading Message Catalogues
53
- ~~~~~~~~~~~~~~~~~~~~~~~~~~
52
+ Loading Message Catalogs
53
+ ~~~~~~~~~~~~~~~~~~~~~~~~
54
54
55
- The messages are stored in message catalogues inside the ``Translator ``
56
- class. A message catalogue is like a dictionary of translations for a specific
55
+ The messages are stored in message catalogs inside the ``Translator ``
56
+ class. A message catalog is like a dictionary of translations for a specific
57
57
locale.
58
58
59
- The Translation component uses Loader classes to load catalogues . You can load
59
+ The Translation component uses Loader classes to load catalogs . You can load
60
60
multiple resources for the same locale, it will be combined into one
61
- catalogue .
61
+ catalog .
62
62
63
63
The component comes with some default Loaders and you can create your own
64
64
Loader too. The default loaders are:
65
65
66
66
* :class: `Symfony\\ Component\\ Translation\\ Loader\\ ArrayLoader ` - to load
67
- catalogues from PHP arrays.
67
+ catalogs from PHP arrays.
68
68
* :class: `Symfony\\ Component\\ Translation\\ Loader\\ CsvFileLoader ` - to load
69
- catalogues from CSV files.
69
+ catalogs from CSV files.
70
70
* :class: `Symfony\\ Component\\ Translation\\ Loader\\ IcuDatFileLoader ` - to load
71
- catalogues form resource bundles.
71
+ catalogs form resource bundles.
72
72
* :class: `Symfony\\ Component\\ Translation\\ Loader\\ IcuResFileLoader ` - to load
73
- catalogues form resource bundles.
73
+ catalogs form resource bundles.
74
74
* :class: `Symfony\\ Component\\ Translation\\ Loader\\ IniFileLoader ` - to load
75
- catalogues form ini files.
75
+ catalogs form ini files.
76
76
* :class: `Symfony\\ Component\\ Translation\\ Loader\\ MoFileLoader ` - to load
77
- catalogues form gettext files.
77
+ catalogs form gettext files.
78
78
* :class: `Symfony\\ Component\\ Translation\\ Loader\\ PhpFileLoader ` - to load
79
- catalogues from PHP files.
79
+ catalogs from PHP files.
80
80
* :class: `Symfony\\ Component\\ Translation\\ Loader\\ PoFileLoader ` - to load
81
- catalogues form gettext files.
81
+ catalogs form gettext files.
82
82
* :class: `Symfony\\ Component\\ Translation\\ Loader\\ QtFileLoader ` - to load
83
- catalogues form QT XML files.
83
+ catalogs form QT XML files.
84
84
* :class: `Symfony\\ Component\\ Translation\\ Loader\\ XliffFileLoader ` - to load
85
- catalogues from Xliff files.
85
+ catalogs from Xliff files.
86
86
* :class: `Symfony\\ Component\\ Translation\\ Loader\\ YamlFileLoader ` - to load
87
- catalogues from Yaml files (requires the :doc: `Yaml component</components/yaml> `).
87
+ catalogs from Yaml files (requires the :doc: `Yaml component</components/yaml> `).
88
88
89
89
.. versionadded :: 2.1
90
90
The ``IcuDatFileLoader ``, ``IcuResFileLoader ``, ``IniFileLoader ``,
@@ -134,7 +134,7 @@ To actually translate the message, the Translator uses a simple process:
134
134
* A catalog of translated messages is loaded from translation resources defined
135
135
for the ``locale `` (e.g. ``fr_FR ``). Messages from the
136
136
:ref: `fallback locale <Fallback Locale >` are also loaded and added to the
137
- catalog if they don't already exist. The end result is a large "dictionary"
137
+ catalog, if they don't already exist. The end result is a large "dictionary"
138
138
of translations;
139
139
140
140
* If the message is located in the catalog, the translation is returned. If
@@ -156,8 +156,8 @@ and returns it (if it exists).
156
156
Fallback Locale
157
157
~~~~~~~~~~~~~~~
158
158
159
- If the message is not located in the catalogue of the specific locale, the
160
- translator will look into the catalogue of the fallback locale. You can set
159
+ If the message is not located in the catalog of the specific locale, the
160
+ translator will look into the catalog of the fallback locale. You can set
161
161
this fallback locale by calling
162
162
:method: `Symfony\\ Component\\ Translation\\ Translator::setFallbackLocale `::
163
163
0 commit comments