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"> 3<head> 4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 5<meta http-equiv="X-UA-Compatible" content="IE=9"/> 6<meta name="generator" content="Doxygen 1.8.6"/> 7<title>Boost.Locale: Using Gettext Tools on Windows</title> 8<link href="tabs.css" rel="stylesheet" type="text/css"/> 9<script type="text/javascript" src="jquery.js"></script> 10<script type="text/javascript" src="dynsections.js"></script> 11<link href="navtree.css" rel="stylesheet" type="text/css"/> 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); 16 $(window).load(resizeHeight); 17</script> 18<link href="doxygen.css" rel="stylesheet" type="text/css" /> 19</head> 20<body> 21<div id="top"><!-- do not remove this div, it is closed by doxygen! --> 22<div id="titlearea"> 23<table cellspacing="0" cellpadding="0"> 24 <tbody> 25 <tr style="height: 56px;"> 26 <td id="projectlogo"><img alt="Logo" src="boost-small.png"/></td> 27 <td style="padding-left: 0.5em;"> 28 <div id="projectname">Boost.Locale 29 </div> 30 </td> 31 </tr> 32 </tbody> 33</table> 34</div> 35<!-- end header part --> 36<!-- Generated by Doxygen 1.8.6 --> 37 <div id="navrow1" class="tabs"> 38 <ul class="tablist"> 39 <li><a href="index.html"><span>Main Page</span></a></li> 40 <li class="current"><a href="pages.html"><span>Related Pages</span></a></li> 41 <li><a href="modules.html"><span>Modules</span></a></li> 42 <li><a href="namespaces.html"><span>Namespaces</span></a></li> 43 <li><a href="annotated.html"><span>Classes</span></a></li> 44 <li><a href="files.html"><span>Files</span></a></li> 45 <li><a href="examples.html"><span>Examples</span></a></li> 46 </ul> 47 </div> 48</div><!-- top --> 49<div id="side-nav" class="ui-resizable side-nav-resizable"> 50 <div id="nav-tree"> 51 <div id="nav-tree-contents"> 52 <div id="nav-sync" class="sync"></div> 53 </div> 54 </div> 55 <div id="splitbar" style="-moz-user-select:none;" 56 class="ui-resizable-handle"> 57 </div> 58</div> 59<script type="text/javascript"> 60$(document).ready(function(){initNavTree('gettext_for_windows.html','');}); 61</script> 62<div id="doc-content"> 63<div class="header"> 64 <div class="headertitle"> 65<div class="title">Using Gettext Tools on Windows </div> </div> 66</div><!--header--> 67<div class="contents"> 68<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> 69<ul> 70<li>Download the package from <a href="http://cppcms.sourceforge.net">CppCMS</a> project (where the Boost.Locale was developed originally)</li> 71<li>Download the a set of packages from MinGW project</li> 72<li>Build it on your own</li> 73<li>Use Cygwin's packages</li> 74</ul> 75<h1><a class="anchor" id="gettext_for_windows_cppcms"></a> 76Getting gettext utilities from CppCMS project</h1> 77<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> 78<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> 79<p>Extract the file and use the executable files inside.</p> 80<h1><a class="anchor" id="gettext_for_windows_mingw"></a> 81Getting Gettext via MinGW project</h1> 82<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> 83<p>In order to install Gettext via MinGW distributing you need to download, a GCC's runtime, iconv library and gettext itself.</p> 84<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> 85<ul> 86<li>From: <code>MinGW/BaseSystem/GCC/Version4/gcc-xxx/</code> <br/> 87 File: <code>libgcc-xxx-mingw32-dll-1.tar.lzma</code> </li> 88<li>From <code>MinGW/Gettext/gettext-yyy/</code> <br/> 89 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> 90<li>From <code>MinGW/libiconv/libiconv-zzz/</code> <br/> 91 Files: <code>libiconv-zzz-mingw32-dll-2.tar.lzma</code>, <code>libcharset-zzz-mingw32-dll-1.tar.lzma</code> </li> 92</ul> 93<p>For example, at June 23, 2011 it was:</p> 94<ul> 95<li>GNU Runtime: <code>libgcc-4.5.2-1-mingw32-dll-1.tar.lzma</code> </li> 96<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> 97<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> 98</ul> 99<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> 100<dl class="section note"><dt>Note</dt><dd>the version on MinGW site is slightly outdated (0.17.1) while gettext provides currently 0.18.1.</dd></dl> 101<h1><a class="anchor" id="gettext_for_windows_build"></a> 102Building latest version on your own.</h1> 103<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> 104<p>Basic and simplest way would be to open a MinGW shell</p> 105<p>Build <code>iconv:</code> </p> 106<div class="fragment"><div class="line">cd libiconv-SOMEVERSION</div> 107<div class="line">./configure --prefix=c:/mygettext --disable-shared</div> 108<div class="line">make</div> 109<div class="line">make install</div> 110<div class="line">cd ..</div> 111<div class="line">cd <a class="code" href="group__message.html#ga1121f0001ff0f3b9455390b6412c6a2c">gettext</a>-SOMEVERSION</div> 112<div class="line">./configure --prefix=c:/mygettext --disable-shared --with-libiconv-prefix=c:/mygettext</div> 113<div class="line">make</div> 114<div class="line">make install</div> 115</div><!-- fragment --><p>And now you have in <code>c:\mygettext\bin</code> all appropriate executable files to use.</p> 116<h1><a class="anchor" id="gettext_for_windows_cygwin"></a> 117Using Cygwin</h1> 118<p>If you already have Cygwin - just use gettext tools provided with it. </p> 119</div></div><!-- contents --> 120</div><!-- doc-content --> 121 122 <li class="footer"> 123© 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. 124 </li> 125 </ul> 126 </div> 127</body> 128</html> 129