Boost.Locale
|
In order to get the Gettext tools like msgfmt
, msgmerge
, xgettext
for Windows you have several options:
Boost.Locale was developed for needs of CppCMS and thus CppCMS hosts a convenience package for Windows users of pre-built, statically liked gettext
runtime utilities like xgettext
, msgfmt
, etc.
You can download a zip file gettext-tools-static-XXX.zip
from the CppCMS downloads page under boost_locale/gettext_for_windows.
Extract the file and use the executable files inside.
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.
In order to install Gettext via MinGW you need to download a GCC runtime, an iconv library and Gettext itself.
So visit MinGW's downloads page and download the following files (chose the latest versions of each package):
MinGW/BaseSystem/GCC/Version4/gcc-xxx/
libgcc-xxx-mingw32-dll-1.tar.lzma
MinGW/Gettext/gettext-yyy/
gettext-yyy-mingw32-dev.tar.lzma
, libgettextpo-yyy-mingw32-dll-0.tar.lzma
, libintl-yyy-mingw32-dll-8.tar.lzma
MinGW/libiconv/libiconv-zzz/
libiconv-zzz-mingw32-dll-2.tar.lzma
, libcharset-zzz-mingw32-dll-1.tar.lzma
For example, at June 23, 2011 it was:
libgcc-4.5.2-1-mingw32-dll-1.tar.lzma
iconv:
libiconv-1.13.1-1-mingw32-dll-2.tar.lzma
and libcharset-1.13.1-1-mingw32-dll-1.tar.lzma
gettext:
libintl-0.17-1-mingw32-dll-8.tar.lzma
, libgettextpo-0.17-1-mingw32-dll-0.tar.lzma
and gettext-0.17-1-mingw32-dev.tar.lzma
.After you download the packages, extract all the files to the same directory using tools like 7zip
and you'll get all the executables and dll's
you need under the bin
subdirectory.
You can build your own version of GNU Gettext using the MinGW environment. You'll need to have an up-to-date gcc compiler and the shell. You'll need to install iconv first and then build Gettext with it.
The simplest way would be to open a MinGW shell.
Build iconv:
And now you have all appropriate executable files ready to use in c:\mygettext\bin
.
If you already have Cygwin - just use the Gettext tools provided with it.