1Locale::Msgfmt(3)     User Contributed Perl Documentation    Locale::Msgfmt(3)
2
3
4

NAME

6       Locale::Msgfmt - Compile .po files to .mo files
7

SYNOPSIS

9       This module does the same thing as msgfmt from GNU gettext-tools,
10       except this is pure Perl. The interface is best explained through
11       examples:
12
13         use Locale::Msgfmt;
14
15         # Compile po/fr.po into po/fr.mo
16         msgfmt({in => "po/fr.po", out => "po/fr.mo"});
17
18         # Compile po/fr.po into po/fr.mo and include fuzzy translations
19         msgfmt({in => "po/fr.po", out => "po/fr.mo", fuzzy => 1});
20
21         # Compile all the .po files in the po directory, and write the .mo
22         # files to the po directory
23         msgfmt("po/");
24
25         # Compile all the .po files in the po directory, and write the .mo
26         # files to the po directory, and include fuzzy translations
27         msgfmt({in => "po/", fuzzy => 1});
28
29         # Compile all the .po files in the po directory, and write the .mo
30         # files to the output directory, creating the output directory if
31         # it doesn't already exist
32         msgfmt({in => "po/", out => "output/"});
33
34         # Compile all the .po files in the po directory, and write the .mo
35         # files to the output directory, and include fuzzy translations
36         msgfmt({in => "po/", out => "output/", fuzzy => 1});
37
38         # Compile po/fr.po into po/fr.mo
39         msgfmt("po/fr.po");
40
41         # Compile po/fr.po into po/fr.mo and include fuzzy translations
42         msgfmt({in => "po/fr.po", fuzzy => 1});
43
45       Copyright 2009 Ryan Niebur, all rights reserved.
46
47       This program is free software; you can redistribute it and/or modify it
48       under the same terms as Perl itself.
49
50
51
52perl v5.34.0                      2021-07-22                 Locale::Msgfmt(3)
Impressum