Locale::Msgfmt(3pm)

Locale::Msgfmt3pm

Compile .po files to .mo files

Usage

This module does the same thing as msgfmt from GNU gettext-tools, except this is pure Perl. The interface is best explained through examples:

  use Locale::Msgfmt;
  # Compile po/fr.po into po/fr.mo
  msgfmt({in => "po/fr.po", out => "po/fr.mo"});
  
  # Compile po/fr.po into po/fr.mo and include fuzzy translations
  msgfmt({in => "po/fr.po", out => "po/fr.mo", fuzzy => 1});
  
  # Compile all the .po files in the po directory, and write the .mo
  # files to the po directory
  msgfmt("po/");
  
  # Compile all the .po files in the po directory, and write the .mo
  # files to the po directory, and include fuzzy translations
  msgfmt({in => "po/", fuzzy => 1});
  
  # Compile all the .po files in the po directory, and write the .mo
  # files to the output directory, creating the output directory if
  # it doesn't already exist
  msgfmt({in => "po/", out => "output/"});
  
  # Compile all the .po files in the po directory, and write the .mo
  # files to the output directory, and include fuzzy translations
  msgfmt({in => "po/", out => "output/", fuzzy => 1});
  
  # Compile po/fr.po into po/fr.mo
  msgfmt("po/fr.po");
  
  # Compile po/fr.po into po/fr.mo and include fuzzy translations
  msgfmt({in => "po/fr.po", fuzzy => 1});

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 2 times.

  1. 6.0
  2. 7–9
  3. 10–13

From liblocale-msgfmt-perl 0.15-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.