<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Localisation</title><link>https://sourceforge.net/p/meson/wiki/Localisation/</link><description>Recent changes to Localisation</description><atom:link href="https://sourceforge.net/p/meson/wiki/Localisation/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 04 Sep 2014 08:02:21 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/meson/wiki/Localisation/feed" rel="self" type="application/rss+xml"/><item><title>Localisation modified by Jussi Pakkanen</title><link>https://sourceforge.net/p/meson/wiki/Localisation/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -1,3 +1,10 @@
+The Meson build system has moved
+==
+
+The new home of Meson's documentation is [here](https://github.com/jpakkane/meson/wiki). The information below is preserved only for posterity. It should be considered out of date.
+
+-------
+
 Localisation with Gettext
 =======

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jussi Pakkanen</dc:creator><pubDate>Thu, 04 Sep 2014 08:02:21 -0000</pubDate><guid>https://sourceforge.net4a8a4d4b397c8d945f0c01e1e8900617823c3c96</guid></item><item><title>Localisation modified by Jussi Pakkanen</title><link>https://sourceforge.net/p/meson/wiki/Localisation/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -10,7 +10,7 @@
     src/subdir/file3.c
     include/mything/somefile.h

-We also need to define an array of strings containing all the locales we want to generate. This is done in the Meson file in the &lt;tt&gt;po&lt;/tt&gt; subdirectory. Assuming we want to generate Finnish and German localisation info, the definition would look like this.
+We also need to define an array of strings containing all the locales we want to generate. This is done in the Meson file in the &lt;tt&gt;po&lt;/tt&gt; subdirectory. Assuming we want to generate Finnish and German localisations, the definition would look like this.

     langs = ['fi', 'de']

@@ -24,6 +24,8 @@

     ninja pot

+If the pot file does not yet exist, it will be created. It is recommended to inspect it manually afterwards and fill in e.g. proper copyright and contact information.
+
 Meson does not currently have built in commands for generating po files from the pot file. This is because translations are usually done by people who are not developers and thus have their own workflows.

 ---
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jussi Pakkanen</dc:creator><pubDate>Thu, 12 Sep 2013 20:20:18 -0000</pubDate><guid>https://sourceforge.neta0ee6f22225f52ab8c73c51c33611b3709337ae4</guid></item><item><title>Localisation modified by Jussi Pakkanen</title><link>https://sourceforge.net/p/meson/wiki/Localisation/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,8 +1,30 @@
 Localisation with Gettext
 =======

+Localising your application with GNU Gettext takes a little effort but is quite straightforward. This documentation assumes that you have a &lt;tt&gt;po&lt;/tt&gt; subdirectory at your project root directory that contains all the localisation info.

+The first thing you need is a file called &lt;tt&gt;POTFILES&lt;/tt&gt;. It lists all the source files that Gettext should scan in order to find strings to translate. The syntax of the file is one line per source file and the line must contain the relative path from source root. A sample POTFILES might look like this.

+    src/file1.c
+    src/file2.c
+    src/subdir/file3.c
+    include/mything/somefile.h
+
+We also need to define an array of strings containing all the locales we want to generate. This is done in the Meson file in the &lt;tt&gt;po&lt;/tt&gt; subdirectory. Assuming we want to generate Finnish and German localisation info, the definition would look like this.
+
+    langs = ['fi', 'de']
+
+Then we need to generate the main pot file. Usually this is generated manually or exists already. If not, see later on how to generate it using Meson. The potfile can have any name but is usually the name of the Gettext package. Let's say the project is called *intltest*. In this case the corresponding pot file would be called &lt;tt&gt;inltest.pot&lt;/tt&gt;.
+
+For each language listed in the array above we need a corresponding &lt;tt&gt;.po&lt;/tt&gt; file. This has to be generated manually, see the Gettext manual for details. Once we have all this, we can define the localisation to Meson with this command.
+
+    gettext('intltest', languages : langs)
+
+The first argument is the Gettext package name. This causes two things to happen. The first is that Meson will generate binary mo files and put them to their proper locations when doing an install. The second is that it creates a build rule to regenerate the main pot file. If you are using the Ninja backend, this is how you would invoke the rebuild.
+
+    ninja pot
+
+Meson does not currently have built in commands for generating po files from the pot file. This is because translations are usually done by people who are not developers and thus have their own workflows.

 ---

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jussi Pakkanen</dc:creator><pubDate>Thu, 12 Sep 2013 20:16:54 -0000</pubDate><guid>https://sourceforge.netc2d6ef226e082e63afa62eb59491a9d587fc5f3b</guid></item><item><title>Localisation modified by Jussi Pakkanen</title><link>https://sourceforge.net/p/meson/wiki/Localisation/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="localisation-with-gettext"&gt;Localisation with Gettext&lt;/h1&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;a class="" href="/p/meson/wiki/Manual/"&gt;Back to index&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jussi Pakkanen</dc:creator><pubDate>Thu, 12 Sep 2013 19:57:26 -0000</pubDate><guid>https://sourceforge.net69fb0d70cfe324f1cea4a1d8f8c8804a9dae53bf</guid></item></channel></rss>