Download the PHP package fisharebest/localization without Composer
On this page you can find all versions of the php package fisharebest/localization. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fisharebest/localization
More information about fisharebest/localization
Files in fisharebest/localization
Package localization
Short Description A lightweight localization database and translation tools, with data from the CLDR, IANA, ISO, etc.
License GPL-3.0-or-later
Homepage https://github.com/fisharebest/localization
Informations about the package localization
Localization standards and data
This package combines localization data from many standards, including the Unicode CLDR, RFC5646 / IANA subtag registry, ISO-3166, ISO-639, ISO-15924, etc., to help you produce applications that behave nicely for visitors from around the world.
Includes definitions for over 800 locales.
Locales, languages, scripts and territories
A locale consists of three things: a language, a script and a territory. Scripts and territories are often implicit from the language.
Normally you would just need to work with locales, and can ignore languages and scripts.
Localization
Create a locale and use it to localize data in your application.
Translation
Plural rules are defined for each locale. This example shows that although English and French both have two plural forms, English considers zero as plural, while French considers it to be singular.
Note that some plural definitions in CLDR differ to those traditionally used by
gettext
. We use the gettext versions for br, fa, fil, he, lv, mk, pt and se.
Translation functions work the same as gettext
.
TIP: If your translations are stored in more than one file, you can merge them easily.
TIP: Loading translations from .PHP files is a little faster than loading them from .MO files. You can convert and/or cache them using this approach.
Updates welcome
Please provide references to sources, such as: