diff --git a/README.md b/README.md index 69438f6..0255168 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ [![Code Coverage](https://img.shields.io/coveralls/ICanBoogie/CLDR/master.svg)](https://coveralls.io/r/ICanBoogie/CLDR) [![Packagist](https://img.shields.io/packagist/dt/icanboogie/cldr.svg)](https://packagist.org/packages/icanboogie/cldr) -The __CLDR__ package provides means to internationalize your application by leveraging the -data and conventions defined by the [Unicode Common Locale Data Repository](http://cldr.unicode.org/) (CLDR). +The __CLDR__ package provides means to internationalize your application by leveraging the data and +conventions defined by the [Unicode Common Locale Data Repository](http://cldr.unicode.org/) (CLDR). It provides many useful locale information and data (such as locale names for territories, languages, days…) as well as formatters for numbers, currencies, date and times, lists… @@ -25,7 +25,8 @@ The CLDR is represented by a [Repository][] instance, from which data is accesse data is retrieved through a provider, and in order to avoid hitting the web with every request, a collection of providers is used, each with its own caching strategies. -**Note:** Most providers defined by the package extend a class defined by the [icanboogie\storage][] package, you might want to check it out. +> **Note:** Most providers defined by the package extend a class defined by the +[icanboogie/storage][] package, you might want to check it out. The following example demonstrates how a repository can be instantiated with a nice collection of providers: @@ -53,8 +54,8 @@ $repository = new Repository($provider); ## Accessing the repository -The repository can be accessed like a big array, but it also provides interfaces to the most important -data such as locales, territories, numbers, currencies… +The repository can be accessed like a big array, but it also provides interfaces to the most +important data such as locales, territories, numbers, currencies… The following example demonstrates how the repository can be used to access locales and supplemental data: @@ -114,7 +115,7 @@ echo $locale->calendar['days']['format']['wide']['sun']; // dimanc Locales are also often used to localize instances such as [Currency][], [Territory][], or even [Locale][]. The method `localize` is used to localize instances. The method tries its best to find a suitable _localizer_, and it helps if the instance to localize implements -[LocalizationAwareInterface][], or if a `ICanBoogie\CLDR\Localized` class is +[LocalizeAwareInterface][], or if a `ICanBoogie\CLDR\Localized` class is defined. ```php @@ -439,11 +440,11 @@ A localized currency can be obtained with the `localize()` method, or the `local of the desired locale, it is often used to format a currency using the convention of a locale. ```php -localize('fr'); # or @@ -499,6 +500,7 @@ list is formatted with the _standard_ type, but you can also provide your own pa **Note:** You can also obtain a localized list formatter, or format a list from a locale. ```php