Skip to content

Commit 019bed7

Browse files
committed
[#2312] Minor tweaks for new intl component documentation
1 parent 7992c57 commit 019bed7

File tree

1 file changed

+27
-22
lines changed

1 file changed

+27
-22
lines changed

components/intl.rst

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ expose them manually by adding the following lines to your autoload code::
6868
in the `ICU component`_.
6969

7070
Depending on the ICU version compiled with your intl extension, a matching
71-
version of that component needs to be installed. Sounds complicated, but usually
72-
Composer does this for you automatically:
71+
version of that component needs to be installed. It sounds complicated,
72+
but usually Composer does this for you automatically:
7373

7474
* 1.0.*: when the intl extension is not available
7575
* 1.1.*: when intl is compiled with ICU 4.0 or higher
@@ -134,14 +134,13 @@ expose them manually by adding the following lines to your autoload code::
134134
extensively and deploy again. The installation of the dependencies will now
135135
succeed.
136136

137-
138137
Writing and Reading Resource Bundles
139138
------------------------------------
140139

141-
The :phpclass:`ResourceBundle` class is currently by this component. Instead,
142-
it includes a set of readers and writers for reading and writing arrays (or
143-
array-like objects) from/to resource bundle files. The following classes are
144-
supported:
140+
The :phpclass:`ResourceBundle` class is not currently supporting by this component.
141+
Instead, it includes a set of readers and writers for reading and writing
142+
arrays (or array-like objects) from/to resource bundle files. The following
143+
classes are supported:
145144

146145
* `TextBundleWriter`_
147146
* `PhpBundleWriter`_
@@ -156,7 +155,8 @@ skip this section and jump to `Accessing ICU Data`_.
156155
TextBundleWriter
157156
~~~~~~~~~~~~~~~~
158157

159-
Writes an array or an array-like object to a plain text resource bundle. The
158+
The :class:`Symfony\\Component\\Intl\\ResourceBundle\\Writer\\TextBundleWriter`
159+
writes an array or an array-like object to a plain-text resource bundle. The
160160
resulting .txt file can be converted to a binary .res file with the
161161
:class:`Symfony\\Component\\Intl\\ResourceBundle\\Compiler\\BundleCompiler`
162162
class::
@@ -186,7 +186,8 @@ constructor.
186186
PhpBundleWriter
187187
~~~~~~~~~~~~~~~
188188

189-
Writes an array or an array-like object to a .php resource bundle::
189+
The :class:`Symfony\\Component\\Intl\\ResourceBundle\\Writer\\PhpBundleWriter`
190+
writes an array or an array-like object to a .php resource bundle::
190191

191192
use Symfony\Component\Intl\ResourceBundle\Writer\PhpBundleWriter;
192193

@@ -202,7 +203,8 @@ Writes an array or an array-like object to a .php resource bundle::
202203
BinaryBundleReader
203204
~~~~~~~~~~~~~~~~~~
204205

205-
Reads binary resource bundle files and returns an array or an array-like object.
206+
The :class:`Symfony\\Component\\Intl\\ResourceBundle\\Reader\\BinaryBundleReader`
207+
reads binary resource bundle files and returns an array or an array-like object.
206208
This class currently only works with the `intl extension`_ installed::
207209

208210
use Symfony\Component\Intl\ResourceBundle\Reader\BinaryBundleReader;
@@ -215,7 +217,8 @@ This class currently only works with the `intl extension`_ installed::
215217
PhpBundleReader
216218
~~~~~~~~~~~~~~~
217219

218-
Reads resource bundles from .php files and returns an array or an array-like
220+
The :class:`Symfony\\Component\\Intl\\ResourceBundle\\Reader\\PhpBundleReader`
221+
reads resource bundles from .php files and returns an array or an array-like
219222
object::
220223

221224
use Symfony\Component\Intl\ResourceBundle\Reader\PhpBundleReader;
@@ -228,7 +231,8 @@ object::
228231
BufferedBundleReader
229232
~~~~~~~~~~~~~~~~~~~~
230233

231-
Wraps another reader, but keeps the last N reads in a buffer, where N is a
234+
The :class:`Symfony\\Component\\Intl\\ResourceBundle\\Reader\\BufferedBundleReader`
235+
wraps another reader, but keeps the last N reads in a buffer, where N is a
232236
buffer size passed to the constructor::
233237

234238
use Symfony\Component\Intl\ResourceBundle\Reader\BinaryBundleReader;
@@ -248,7 +252,8 @@ buffer size passed to the constructor::
248252
StructuredBundleReader
249253
~~~~~~~~~~~~~~~~~~~~~~
250254

251-
Wraps another reader and offers a
255+
The :class:`Symfony\\Component\\Intl\\ResourceBundle\\Reader\\StructuredBundleReader`
256+
wraps another reader and offers a
252257
:method:`Symfony\\Component\\Intl\\ResourceBundle\\Reader\\StructuredBundleReaderInterface::readEntry`
253258
method for reading an entry of the resource bundle without having to worry
254259
whether array keys are set or not. If a path cannot be resolved, ``null`` is
@@ -316,8 +321,8 @@ bundle::
316321
$script = Intl::getLanguageBundle()->getScriptName('Hans');
317322
// => 'Simplified'
318323

319-
All methods accept the translation locale as last, optional parameter, which
320-
defaults to the current default locale::
324+
All methods accept the translation locale as the last, optional parameter,
325+
which defaults to the current default locale::
321326

322327
$languages = Intl::getLanguageBundle()->getLanguageNames('de');
323328
// => array('ab' => 'Abchasisch', ...)
@@ -337,8 +342,8 @@ The translations of country names can be found in the region bundle::
337342
$country = Intl::getRegionBundle()->getCountryName('GB');
338343
// => 'United Kingdom'
339344

340-
All methods accept the translation locale as last, optional parameter, which
341-
defaults to the current default locale::
345+
All methods accept the translation locale as the last, optional parameter,
346+
which defaults to the current default locale::
342347

343348
$countries = Intl::getRegionBundle()->getCountryNames('de');
344349
// => array('AF' => 'Afghanistan', ...)
@@ -358,8 +363,8 @@ The translations of locale names can be found in the locale bundle::
358363
$locale = Intl::getLocaleBundle()->getLocaleName('zh_Hans_MO');
359364
// => 'Chinese (Simplified, Macau SAR China)'
360365

361-
All methods accept the translation locale as last, optional parameter, which
362-
defaults to the current default locale::
366+
All methods accept the translation locale as the last, optional parameter,
367+
which defaults to the current default locale::
363368

364369
$locales = Intl::getLocaleBundle()->getLocaleNames('de');
365370
// => array('af' => 'Afrikaans', ...)
@@ -393,13 +398,13 @@ All methods (except for
393398
:method:`Symfony\\Component\\Intl\\ResourceBundle\\CurrencyBundleInterface::getFractionDigits`
394399
and
395400
:method:`Symfony\\Component\\Intl\\ResourceBundle\\CurrencyBundleInterface::getRoundingIncrement`)
396-
accept the translation locale as last, optional parameter, which defaults to the
397-
current default locale::
401+
accept the translation locale as the last, optional parameter, which defaults
402+
to the current default locale::
398403

399404
$currencies = Intl::getCurrencyBundle()->getCurrencyNames('de');
400405
// => array('AFN' => 'Afghanische Afghani', ...)
401406

402-
That's all you need to know for now. Have fun at coding!
407+
That's all you need to know for now. Have fun coding!
403408

404409
.. _Packagist: https://packagist.org/packages/symfony/intl
405410
.. _ICU component: https://packagist.org/packages/symfony/icu

0 commit comments

Comments
 (0)