This project is an effort to create a free, open source repository of GNU gettext PO files samples database.
It is intended to be used as a learning resource, demonstrating most GNU Gettext features. It can also be used by programmers to build or test their gettext implementations.
235 languages and dialects PO samples are provided including the proper Plural-Forms header.
The project also contains a separate database of Plural-Forms.
Please check the /data/plural-forms.json
for details. The file is self-explanatory.
An Erlang file is offered as an alternative to the JSON database.
/po
- contains "translations" for the/po/template.pot
file in 235 languages/data
- contains useful data for projects related to gettext/data/plural-forms.json
- contains a database of plural formulas in JSON format/data/plural-forms.eterm
- contains a database of plural formulas in Erlang term format to use with file:consult/1/generator
- contains Erlang escript used to generate this database
The need for creating the gettext PO samples database arose while writing a PO parser in Erlang.
Short answer: Yes, if you trust CLDR Project.
We use the following sources and tools for compiling the database:
- Unicode CLDR Project https://cldr.unicode.org/
- PHP gettext language list https://github.com/php-gettext/Languages
- TranslateHouse http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html
Formulas are automated generated by php-gettext from CLDR. Each new release is manually checked and compared with the sources mentioned above.
Data is compiled into /generator/data/languages.config
file, used by /generator
Erlang escript to create the PO database and data files.
- Continuously check plural formulas and monitor CLDR for changes.
- Study various gettext projects and test compatibility with this repository.
- Add more useful data related to PO and GNU gettext.
(Please make a pull request if you want your project added to this list)
A backlink is highly appreciated but not required!
- Madalin Grigore-Enescu (ergenius) [email protected]
gettext-po-samples is available under the MIT license (see LICENSE
).