1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
6 <title>Boost.Locale: Using Gettext Tools on Windows</title>
8 <link href="tabs.css" rel="stylesheet" type="text/css"/>
9 <link href="doxygen.css" rel="stylesheet" type="text/css" />
10 <link href="navtree.css" rel="stylesheet" type="text/css"/>
11 <script type="text/javascript" src="jquery.js"></script>
12 <script type="text/javascript" src="resize.js"></script>
13 <script type="text/javascript" src="navtree.js"></script>
14 <script type="text/javascript">
15 $(document).ready(initResizable);
21 <div id="top"><!-- do not remove this div! -->
25 <table cellspacing="0" cellpadding="0">
27 <tr style="height: 56px;">
29 <td id="projectlogo"><img alt="Logo" src="boost-small.png"/></td>
32 <td style="padding-left: 0.5em;">
33 <div id="projectname">Boost.Locale
46 <!-- Generated by Doxygen 1.7.6.1 -->
47 <div id="navrow1" class="tabs">
49 <li><a href="index.html"><span>Main Page</span></a></li>
50 <li><a href="modules.html"><span>Modules</span></a></li>
51 <li><a href="namespaces.html"><span>Namespaces</span></a></li>
52 <li><a href="annotated.html"><span>Classes</span></a></li>
53 <li><a href="files.html"><span>Files</span></a></li>
54 <li><a href="examples.html"><span>Examples</span></a></li>
58 <div id="side-nav" class="ui-resizable side-nav-resizable">
60 <div id="nav-tree-contents">
63 <div id="splitbar" style="-moz-user-select:none;"
64 class="ui-resizable-handle">
67 <script type="text/javascript">
68 initNavTree('gettext_for_windows.html','');
70 <div id="doc-content">
72 <div class="headertitle">
73 <div class="title">Using Gettext Tools on Windows </div> </div>
75 <div class="contents">
76 <div class="textblock"><p>In order to get the Gettext tools like <code>msgfmt</code>, <code>msgmerge</code>, <code>xgettext</code> for Windows you have basically several options:</p>
78 <li>Download the package from <a href="http://cppcms.sourceforge.net">CppCMS</a> project (where the Boost.Locale was developed originally)</li>
79 <li>Download the a set of packages from MinGW project</li>
80 <li>Build it on your own</li>
81 <li>Use Cygwin's packages</li>
83 <h2><a class="anchor" id="gettext_for_windows_cppcms"></a>
84 Getting gettext utilities from CppCMS project</h2>
85 <p>Boost.Locale was developed for needs of <a href="http://cppcms.sourceforge.net">CppCMS</a> project and thus CppCMS hosts a convince package for Windows users of pre-build, statically liked <code>gettext</code> runtime utilities like <code>xgettext</code>, <code>msgfmt</code>, etc.</p>
86 <p>So you can download a zip file <code>gettext-tools-static-XXX.zip</code> from a CppCMS downloads page under <a href="https://sourceforge.net/projects/cppcms/files/boost_locale/gettext_for_windows/">boost_locale/gettext_for_windows</a>.</p>
87 <p>Extract the file and use the executable files inside.</p>
88 <h2><a class="anchor" id="gettext_for_windows_mingw"></a>
89 Getting Gettext via MinGW project</h2>
90 <p>MinGW project provides GNU tools for Windows, including GNU compilers and various runtime utilities. Thus you can always install full MinGW distribution including gettext tools. However, if you a want minimalistic runtime version that allows you to extract messages and create catalogs you need to download several packages manually.</p>
91 <p>In order to install Gettext via MinGW distributing you need to download, a GCC's runtime, iconv library and gettext itself.</p>
92 <p>So visit a <a href="https://sourceforge.net/projects/mingw/files/">downloads page</a> of MinGW project and download following files (chose the latest versions of each package):</p>
94 <li>From: <code>MinGW/BaseSystem/GCC/Version4/gcc-xxx/</code> <br/>
95 File: <code>libgcc-xxx-mingw32-dll-1.tar.lzma</code> </li>
96 <li>From <code>MinGW/Gettext/gettext-yyy/</code> <br/>
97 Files: <code>gettext-yyy-mingw32-dev.tar.lzma</code>, <code>libgettextpo-yyy-mingw32-dll-0.tar.lzma</code>, <code>libintl-yyy-mingw32-dll-8.tar.lzma</code> </li>
98 <li>From <code>MinGW/libiconv/libiconv-zzz/</code> <br/>
99 Files: <code>libiconv-zzz-mingw32-dll-2.tar.lzma</code>, <code>libcharset-zzz-mingw32-dll-1.tar.lzma</code> </li>
101 <p>For example, at June 23, 2011 it was:</p>
103 <li>GNU Runtime: <code>libgcc-4.5.2-1-mingw32-dll-1.tar.lzma</code> </li>
104 <li><code>iconv:</code> <code>libiconv-1.13.1-1-mingw32-dll-2.tar.lzma</code> and <code>libcharset-1.13.1-1-mingw32-dll-1.tar.lzma</code> </li>
105 <li><code>gettext:</code> <code>libintl-0.17-1-mingw32-dll-8.tar.lzma</code>, <code>libgettextpo-0.17-1-mingw32-dll-0.tar.lzma</code> and <code>gettext-0.17-1-mingw32-dev.tar.lzma</code>.</li>
107 <p>After you download the packages, extract all the files to the same directory using tools like <code>7zip</code> and you'll get all the executables and <code>dll's</code> you need under <code>bin</code> subdirectory.</p>
108 <dl class="note"><dt><b>Note:</b></dt><dd>the version on MinGW site is slightly outdated (0.17.1) while gettext provides currently 0.18.1.</dd></dl>
109 <h2><a class="anchor" id="gettext_for_windows_build"></a>
110 Building latest version on your own.</h2>
111 <p>You can build your own version of GNU Gettext using MinGW environment, you'll need to have up-to-date gcc compiler and the shell, you'll need to install iconv first and then build a gettext with it.</p>
112 <p>Basic and simplest way would be to open a MinGW shell</p>
113 <p>Build <code>iconv:</code> </p>
114 <div class="fragment"><pre class="fragment">cd libiconv-SOMEVERSION
115 ./configure --prefix=c:/mygettext --disable-shared
119 cd <a class="code" href="group__message.html#ga1121f0001ff0f3b9455390b6412c6a2c">gettext</a>-SOMEVERSION
120 ./configure --prefix=c:/mygettext --disable-shared --with-libiconv-prefix=c:/mygettext
123 </pre></div><p>And now you have in <code>c:\mygettext\bin</code> all appropriate executable files to use.</p>
124 <h2><a class="anchor" id="gettext_for_windows_cygwin"></a>
126 <p>If you already have Cygwin - just use gettext tools provided with it. </p>
127 </div></div><!-- contents -->
129 <div id="nav-path" class="navpath">
131 <li class="navelem"><a class="el" href="index.html">Boost.Locale</a> </li>
132 <li class="navelem"><a class="el" href="appendix.html">Appendix</a> </li>
135 © Copyright 2009-2012 Artyom Beilis, Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License</a>, Version 1.0.