Skip to content

ergenius/gettext-po-samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gettext-po-samples

Gettext PO samples database

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.

Project structure

  • /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

Motivation

The need for creating the gettext PO samples database arose while writing a PO parser in Erlang.

Is this data correct?

Short answer: Yes, if you trust CLDR Project.

We use the following sources and tools for compiling the database:

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.

Project roadmap

  1. Continuously check plural formulas and monitor CLDR for changes.
  2. Study various gettext projects and test compatibility with this repository.
  3. Add more useful data related to PO and GNU gettext.

Projects using gettext-po-samples

(Please make a pull request if you want your project added to this list)

A backlink is highly appreciated but not required!

Authors

License

gettext-po-samples is available under the MIT license (see LICENSE).