Crate polib

source ·
Expand description

This crate allows users to load, manipulate and save translation data in GNU gettext .po file format. Saving translation data into .mo file format is also supported. For simplicity, only UTF-8 encoding is supported.

A Message represents an entry in the translation data that maps a string or a pair of singular form and plural form strings in the original language to a string or a vector of string in different plural forms in the target language.

A Catalog holds a collection set of Messages, and is stored in a .po or .mo file.

Metadata is the “header” section of a Catalog that declares its properties like target language, character encoding, translation template creation date, last time translated, plural forms rules, etc.

Modules

  • Defines Catalog struct and its iterators.
  • Defines Message struct and its view traits.
  • Defines CatalogMetadata struct.
  • Writing to MO files.
  • Parsing and writing to PO files.