~ubuntu-branches/ubuntu/trusty/glib2.0/trusty-proposed

« back to all changes in this revision

Viewing changes to docs/reference/glib/html/glib-I18N.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-03-23 19:25:52 UTC
  • mfrom: (3.4.9 experimental)
  • Revision ID: james.westby@ubuntu.com-20100323192552-istna8c33bw6harh
Tags: 2.23.6-1ubuntu1
* Resync on Debian
* debian/patches/01_gettext-desktopfiles.patch:
  - updated to use gettext for X-GNOME-Fullname too
* debian/patches/71_gio_launch_handler.patch:
  - new gio default launch handle feature required for wncksync
* debian/control.in, 
  debian/patches/80-gtester-subunit.patch:
  - gtester-report subunit support
* debian/libglib2.0-0.symbols:
  - updated the symbols list for the gio launcher handler

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
<link rel="up" href="glib-utilities.html" title="GLib Utilities">
9
9
<link rel="prev" href="glib-Data-Checksums.html" title="Data Checksums">
10
10
<link rel="next" href="glib-Date-and-Time-Functions.html" title="Date and Time Functions">
11
 
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.13 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="chapter" href="glib.html" title="GLib Overview">
14
14
<link rel="chapter" href="glib-fundamentals.html" title="GLib Fundamentals">
42
42
</tr>
43
43
<tr><td colspan="5" class="shortcuts">
44
44
<a href="#glib-I18N.synopsis" class="shortcut">Top</a>
45
 
                 | 
46
 
                <a href="#glib-I18N.description" class="shortcut">Description</a>
 
45
                   | 
 
46
                  <a href="#glib-I18N.description" class="shortcut">Description</a>
47
47
</td></tr>
48
48
</table>
49
49
<div class="refentry" title="Internationalization">
58
58
<div class="refsynopsisdiv" title="Synopsis">
59
59
<a name="glib-I18N.synopsis"></a><h2>Synopsis</h2>
60
60
<pre class="synopsis">
61
 
 
62
61
#include &lt;glib.h&gt;
63
62
#include &lt;glib/gi18n.h&gt;
64
63
 
65
 
#define             <a class="link" href="glib-I18N.html#Q---CAPS" title="Q_()">Q_</a>                                  (String)
66
 
#define             <a class="link" href="glib-I18N.html#C---CAPS" title="C_()">C_</a>                                  (Context,String)
67
 
#define             <a class="link" href="glib-I18N.html#N---CAPS" title="N_()">N_</a>                                  (String)
68
 
#define             <a class="link" href="glib-I18N.html#NC---CAPS" title="NC_()">NC_</a>                                 (Context, String)
69
 
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *       <a class="link" href="glib-I18N.html#g-dgettext" title="g_dgettext ()">g_dgettext</a>                          (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *domain,
70
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *msgid);
71
 
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *       <a class="link" href="glib-I18N.html#g-dngettext" title="g_dngettext ()">g_dngettext</a>                         (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *domain,
72
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *msgid,
73
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *msgid_plural,
74
 
                                                         <a class="link" href="glib-Basic-Types.html#gulong" title="gulong">gulong</a> n);
75
 
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *       <a class="link" href="glib-I18N.html#g-dpgettext" title="g_dpgettext ()">g_dpgettext</a>                         (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *domain,
76
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *msgctxtid,
77
 
                                                         <a class="link" href="glib-Basic-Types.html#gsize" title="gsize">gsize</a> msgidoffset);
78
 
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *       <a class="link" href="glib-I18N.html#g-dpgettext2" title="g_dpgettext2 ()">g_dpgettext2</a>                        (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *domain,
79
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *context,
80
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *msgid);
81
 
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *       <a class="link" href="glib-I18N.html#g-strip-context" title="g_strip_context ()">g_strip_context</a>                     (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *msgid,
82
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *msgval);
 
64
#define             <a class="link" href="glib-I18N.html#Q-:CAPS" title="Q_()">Q_</a>                                  (String)
 
65
#define             <a class="link" href="glib-I18N.html#C-:CAPS" title="C_()">C_</a>                                  (Context,String)
 
66
#define             <a class="link" href="glib-I18N.html#N-:CAPS" title="N_()">N_</a>                                  (String)
 
67
#define             <a class="link" href="glib-I18N.html#NC-:CAPS" title="NC_()">NC_</a>                                 (Context, String)
 
68
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="glib-I18N.html#g-dgettext" title="g_dgettext ()">g_dgettext</a>                          (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *domain,
 
69
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *msgid);
 
70
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="glib-I18N.html#g-dngettext" title="g_dngettext ()">g_dngettext</a>                         (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *domain,
 
71
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *msgid,
 
72
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *msgid_plural,
 
73
                                                         <a class="link" href="glib-Basic-Types.html#gulong" title="gulong"><span class="returnvalue">gulong</span></a> n);
 
74
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="glib-I18N.html#g-dpgettext" title="g_dpgettext ()">g_dpgettext</a>                         (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *domain,
 
75
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *msgctxtid,
 
76
                                                         <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="returnvalue">gsize</span></a> msgidoffset);
 
77
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="glib-I18N.html#g-dpgettext2" title="g_dpgettext2 ()">g_dpgettext2</a>                        (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *domain,
 
78
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *context,
 
79
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *msgid);
 
80
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="glib-I18N.html#g-strip-context" title="g_strip_context ()">g_strip_context</a>                     (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *msgid,
 
81
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *msgval);
83
82
 
84
 
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a>* const * <a class="link" href="glib-I18N.html#g-get-language-names" title="g_get_language_names ()">g_get_language_names</a>               (void);
 
83
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a>* const * <a class="link" href="glib-I18N.html#g-get-language-names" title="g_get_language_names ()">g_get_language_names</a>               (void);
85
84
</pre>
86
85
</div>
87
86
<div class="refsect1" title="Description">
98
97
<code class="filename">glib/gi18n-lib.h</code> <span class="emphasis"><em>after</em></span> defining
99
98
the GETTEXT_PACKAGE macro suitably for your library:
100
99
</p>
101
 
<div class="informalexample"><pre class="programlisting">
102
 
#define GETTEXT_PACKAGE "gtk20"
103
 
#include &lt;glib/gi18n-lib.h&gt;
104
 
</pre></div>
 
100
<div class="informalexample">
 
101
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
 
102
    <tbody>
 
103
      <tr>
 
104
        <td class="listing_lines" align="right"><pre>1
 
105
2</pre></td>
 
106
        <td class="listing_code"><pre class="programlisting"><span class="preproc">#define</span><span class="normal"> GETTEXT_PACKAGE </span><span class="string">"gtk20"</span>
 
107
<span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;glib/gi18n-lib.h&gt;</span></pre></td>
 
108
      </tr>
 
109
    </tbody>
 
110
  </table>
 
111
</div>
 
112
 
105
113
<p>
106
114
The gettext manual covers details of how to set up message extraction
107
115
with xgettext.
110
118
<div class="refsect1" title="Details">
111
119
<a name="glib-I18N.details"></a><h2>Details</h2>
112
120
<div class="refsect2" title="Q_()">
113
 
<a name="Q---CAPS"></a><h3>Q_()</h3>
 
121
<a name="Q-:CAPS"></a><h3>Q_()</h3>
114
122
<pre class="programlisting">#define             Q_(String)</pre>
115
123
<p>
116
124
Like <code class="function">_()</code>, but handles context in message ids. This has the advantage that
126
134
"language|Russian".
127
135
</p>
128
136
<p>
129
 
See the <a class="link" href="glib-I18N.html#C---CAPS" title="C_()"><code class="function">C_()</code></a> macro for a different way to mark up translatable strings
 
137
See the <a class="link" href="glib-I18N.html#C-:CAPS" title="C_()"><code class="function">C_()</code></a> macro for a different way to mark up translatable strings
130
138
with context.
131
139
</p>
132
140
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
133
141
<h3 class="title">Note</h3>
134
142
<p>
135
 
If you are using the <a class="link" href="glib-I18N.html#Q---CAPS" title="Q_()"><code class="function">Q_()</code></a> macro, you need to make sure that you
 
143
If you are using the <a class="link" href="glib-I18N.html#Q-:CAPS" title="Q_()"><code class="function">Q_()</code></a> macro, you need to make sure that you
136
144
pass <code class="option">--keyword=Q_</code> to xgettext when extracting messages.
137
145
If you are using GNU gettext &gt;= 0.15, you can also use
138
146
<code class="option">--keyword=Q_:1g</code> to let xgettext split the context
159
167
</div>
160
168
<hr>
161
169
<div class="refsect2" title="C_()">
162
 
<a name="C---CAPS"></a><h3>C_()</h3>
 
170
<a name="C-:CAPS"></a><h3>C_()</h3>
163
171
<pre class="programlisting">#define             C_(Context,String)</pre>
164
172
<p>
165
173
Uses gettext to get the translation for <em class="parameter"><code>msgid</code></em>. <em class="parameter"><code>msgctxt</code></em> is
167
175
may need different translations, depending on the context in which
168
176
they are used.
169
177
</p>
170
 
<div class="informalexample"><pre class="programlisting">
171
 
label1 = C_("Navigation", "Back");
172
 
label2 = C_("Body part", "Back");
173
 
</pre></div>
 
178
<div class="informalexample">
 
179
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
 
180
    <tbody>
 
181
      <tr>
 
182
        <td class="listing_lines" align="right"><pre>1
 
183
2</pre></td>
 
184
        <td class="listing_code"><pre class="programlisting"><span class="normal">label1 </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="glib-I18N.html#C-:CAPS">C_</a></span><span class="symbol">(</span><span class="string">"Navigation"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Back"</span><span class="symbol">);</span>
 
185
<span class="normal">label2 </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="glib-I18N.html#C-:CAPS">C_</a></span><span class="symbol">(</span><span class="string">"Body part"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Back"</span><span class="symbol">);</span></pre></td>
 
186
      </tr>
 
187
    </tbody>
 
188
  </table>
 
189
</div>
 
190
 
174
191
<p>
175
192
</p>
176
193
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
177
194
<h3 class="title">Note</h3>
178
195
<p>
179
 
If you are using the <a class="link" href="glib-I18N.html#C---CAPS" title="C_()"><code class="function">C_()</code></a> macro, you need to make sure that you
 
196
If you are using the <a class="link" href="glib-I18N.html#C-:CAPS" title="C_()"><code class="function">C_()</code></a> macro, you need to make sure that you
180
197
pass <code class="option">--keyword=C_:1c,2</code> to xgettext when extracting
181
198
messages. Note that this only works with GNU gettext &gt;= 0.15.
182
199
</p>
205
222
</div>
206
223
<hr>
207
224
<div class="refsect2" title="N_()">
208
 
<a name="N---CAPS"></a><h3>N_()</h3>
 
225
<a name="N-:CAPS"></a><h3>N_()</h3>
209
226
<pre class="programlisting">#define             N_(String)</pre>
210
227
<p>
211
228
Only marks a string for translation.
213
230
be directly used, e.g. in string array initializers.
214
231
To get the translated string, call <code class="function">gettext()</code> at runtime.
215
232
</p>
216
 
<div class="informalexample"><pre class="programlisting">
217
 
     {
218
 
       static const char *messages[] = {
219
 
         N_("some very meaningful message"),
220
 
         N_("and another one")
221
 
       };
222
 
       const char *string;
223
 
       ...
224
 
       string
225
 
         = index &gt; 1 ? _("a default message") : gettext (messages[index]);
226
 
 
227
 
       fputs (string);
228
 
       ...
229
 
     }
230
 
</pre></div>
 
233
<div class="informalexample">
 
234
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
 
235
    <tbody>
 
236
      <tr>
 
237
        <td class="listing_lines" align="right"><pre>1
 
238
2
 
239
3
 
240
4
 
241
5
 
242
6
 
243
7
 
244
8
 
245
9
 
246
10
 
247
11
 
248
12
 
249
13</pre></td>
 
250
        <td class="listing_code"><pre class="programlisting"><span class="cbracket">{</span>
 
251
<span class="normal">  </span><span class="keyword">static</span><span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">messages</span><span class="symbol">[]</span><span class="normal"> </span><span class="symbol">=</span><span class="normal"> </span><span class="cbracket">{</span>
 
252
<span class="normal">    </span><span class="function"><a href="glib-I18N.html#N-:CAPS">N_</a></span><span class="symbol">(</span><span class="string">"some very meaningful message"</span><span class="symbol">),</span>
 
253
<span class="normal">    </span><span class="function"><a href="glib-I18N.html#N-:CAPS">N_</a></span><span class="symbol">(</span><span class="string">"and another one"</span><span class="symbol">)</span>
 
254
<span class="normal">  </span><span class="cbracket">}</span><span class="symbol">;</span>
 
255
<span class="normal">  </span><span class="keyword">const</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">string</span><span class="symbol">;</span>
 
256
<span class="normal">  </span><span class="symbol">...</span>
 
257
<span class="normal">  string</span>
 
258
<span class="normal">    </span><span class="symbol">=</span><span class="normal"> index </span><span class="symbol">&gt;</span><span class="normal"> </span><span class="number">1</span><span class="normal"> </span><span class="symbol">?</span><span class="normal"> </span><span class="function">_</span><span class="symbol">(</span><span class="string">"a default message"</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="function">gettext</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">messages</span><span class="symbol">[</span><span class="normal">index</span><span class="symbol">]);</span>
 
259
 
 
260
<span class="normal">  </span><span class="function">fputs</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">string</span><span class="symbol">);</span>
 
261
<span class="normal">  </span><span class="symbol">...</span>
 
262
<span class="cbracket">}</span></pre></td>
 
263
      </tr>
 
264
    </tbody>
 
265
  </table>
 
266
</div>
 
267
 
231
268
<div class="variablelist"><table border="0">
232
269
<col align="left" valign="top">
233
270
<tbody><tr>
240
277
</div>
241
278
<hr>
242
279
<div class="refsect2" title="NC_()">
243
 
<a name="NC---CAPS"></a><h3>NC_()</h3>
 
280
<a name="NC-:CAPS"></a><h3>NC_()</h3>
244
281
<pre class="programlisting">#define             NC_(Context, String)</pre>
245
282
<p>
246
283
Only marks a string for translation, with context.
248
285
be directly used, e.g. in string array initializers.
249
286
To get the translated string, you should call <a class="link" href="glib-I18N.html#g-dpgettext2" title="g_dpgettext2 ()"><code class="function">g_dpgettext2()</code></a> at runtime.
250
287
</p>
251
 
<div class="informalexample"><pre class="programlisting">
252
 
     {
253
 
       static const char *messages[] = {
254
 
         NC_("some context", "some very meaningful message"),
255
 
         NC_("some context", "and another one")
256
 
       };
257
 
       const char *string;
258
 
       ...
259
 
       string
260
 
         = index &gt; 1 ? g_dpgettext2 (NULL, "some context", "a default message") : g_dpgettext2 (NULL, "some context", messages[index]);
261
 
 
262
 
       fputs (string);
263
 
       ...
264
 
     }
265
 
</pre></div>
 
288
<div class="informalexample">
 
289
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
 
290
    <tbody>
 
291
      <tr>
 
292
        <td class="listing_lines" align="right"><pre>1
 
293
2
 
294
3
 
295
4
 
296
5
 
297
6
 
298
7
 
299
8
 
300
9
 
301
10
 
302
11
 
303
12
 
304
13</pre></td>
 
305
        <td class="listing_code"><pre class="programlisting"><span class="cbracket">{</span>
 
306
<span class="normal">  </span><span class="keyword">static</span><span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">messages</span><span class="symbol">[]</span><span class="normal"> </span><span class="symbol">=</span><span class="normal"> </span><span class="cbracket">{</span>
 
307
<span class="normal">    </span><span class="function"><a href="glib-I18N.html#NC-:CAPS">NC_</a></span><span class="symbol">(</span><span class="string">"some context"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"some very meaningful message"</span><span class="symbol">),</span>
 
308
<span class="normal">    </span><span class="function"><a href="glib-I18N.html#NC-:CAPS">NC_</a></span><span class="symbol">(</span><span class="string">"some context"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"and another one"</span><span class="symbol">)</span>
 
309
<span class="normal">  </span><span class="cbracket">}</span><span class="symbol">;</span>
 
310
<span class="normal">  </span><span class="keyword">const</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">string</span><span class="symbol">;</span>
 
311
<span class="normal">  </span><span class="symbol">...</span>
 
312
<span class="normal">  string</span>
 
313
<span class="normal">    </span><span class="symbol">=</span><span class="normal"> index </span><span class="symbol">&gt;</span><span class="normal"> </span><span class="number">1</span><span class="normal"> </span><span class="symbol">?</span><span class="normal"> </span><span class="function"><a href="glib-I18N.html#g-dpgettext2">g_dpgettext2</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span><span class="normal"> </span><span class="string">"some context"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"a default message"</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="function"><a href="glib-I18N.html#g-dpgettext2">g_dpgettext2</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span><span class="normal"> </span><span class="string">"some context"</span><span class="symbol">,</span><span class="normal"> messages</span><span class="symbol">[</span><span class="normal">index</span><span class="symbol">]);</span>
 
314
 
 
315
<span class="normal">  </span><span class="function">fputs</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">string</span><span class="symbol">);</span>
 
316
<span class="normal">  </span><span class="symbol">...</span>
 
317
<span class="cbracket">}</span></pre></td>
 
318
      </tr>
 
319
    </tbody>
 
320
  </table>
 
321
</div>
 
322
 
266
323
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
267
324
<h3 class="title">Note</h3>
268
325
<p>
269
 
If you are using the <a class="link" href="glib-I18N.html#NC---CAPS" title="NC_()"><code class="function">NC_()</code></a> macro, you need to make sure that you
 
326
If you are using the <a class="link" href="glib-I18N.html#NC-:CAPS" title="NC_()"><code class="function">NC_()</code></a> macro, you need to make sure that you
270
327
pass <code class="option">--keyword=NC_:1c,2</code> to xgettext when extracting
271
328
messages. Note that this only works with GNU gettext &gt;= 0.15.
272
 
Intltool has support for the <a class="link" href="glib-I18N.html#NC---CAPS" title="NC_()"><code class="function">NC_()</code></a> macro since version 0.40.1.
 
329
Intltool has support for the <a class="link" href="glib-I18N.html#NC-:CAPS" title="NC_()"><code class="function">NC_()</code></a> macro since version 0.40.1.
273
330
</p>
274
331
</div>
275
332
<div class="variablelist"><table border="0">
292
349
<hr>
293
350
<div class="refsect2" title="g_dgettext ()">
294
351
<a name="g-dgettext"></a><h3>g_dgettext ()</h3>
295
 
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *       g_dgettext                          (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *domain,
296
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *msgid);</pre>
 
352
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *       g_dgettext                          (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *domain,
 
353
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *msgid);</pre>
297
354
<p>
298
355
This function is a wrapper of <code class="function">dgettext()</code> which does not translate
299
356
the message if the default domain as set with <code class="function">textdomain()</code> has no
315
372
</p>
316
373
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
317
374
<li class="listitem">
318
 
<em class="parameter"><code>domain</code></em> is not <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>
 
375
<em class="parameter"><code>domain</code></em> is not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
319
376
</li>
320
377
<li class="listitem">
321
378
<code class="function">textdomain()</code> has been called to set a default text domain</li>
334
391
<p>
335
392
Applications should normally not use this function directly,
336
393
but use the <code class="function">_()</code> macro for translations.</p>
337
 
<p>
338
 
</p>
339
394
<div class="variablelist"><table border="0">
340
395
<col align="left" valign="top">
341
396
<tbody>
342
397
<tr>
343
398
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
344
 
<td> the translation domain to use, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> to use
 
399
<td> the translation domain to use, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to use
345
400
  the domain set with <code class="function">textdomain()</code>
346
401
</td>
347
402
</tr>
363
418
<hr>
364
419
<div class="refsect2" title="g_dngettext ()">
365
420
<a name="g-dngettext"></a><h3>g_dngettext ()</h3>
366
 
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *       g_dngettext                         (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *domain,
367
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *msgid,
368
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *msgid_plural,
369
 
                                                         <a class="link" href="glib-Basic-Types.html#gulong" title="gulong">gulong</a> n);</pre>
 
421
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *       g_dngettext                         (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *domain,
 
422
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *msgid,
 
423
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *msgid_plural,
 
424
                                                         <a class="link" href="glib-Basic-Types.html#gulong" title="gulong"><span class="returnvalue">gulong</span></a> n);</pre>
370
425
<p>
371
426
This function is a wrapper of <code class="function">dngettext()</code> which does not translate
372
427
the message if the default domain as set with <code class="function">textdomain()</code> has no
375
430
<p>
376
431
See <a class="link" href="glib-I18N.html#g-dgettext" title="g_dgettext ()"><code class="function">g_dgettext()</code></a> for details of how this differs from <code class="function">dngettext()</code>
377
432
proper.</p>
378
 
<p>
379
 
</p>
380
433
<div class="variablelist"><table border="0">
381
434
<col align="left" valign="top">
382
435
<tbody>
383
436
<tr>
384
437
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
385
 
<td> the translation domain to use, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> to use
 
438
<td> the translation domain to use, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to use
386
439
  the domain set with <code class="function">textdomain()</code>
387
440
</td>
388
441
</tr>
414
467
<hr>
415
468
<div class="refsect2" title="g_dpgettext ()">
416
469
<a name="g-dpgettext"></a><h3>g_dpgettext ()</h3>
417
 
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *       g_dpgettext                         (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *domain,
418
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *msgctxtid,
419
 
                                                         <a class="link" href="glib-Basic-Types.html#gsize" title="gsize">gsize</a> msgidoffset);</pre>
 
470
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *       g_dpgettext                         (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *domain,
 
471
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *msgctxtid,
 
472
                                                         <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="returnvalue">gsize</span></a> msgidoffset);</pre>
420
473
<p>
421
474
This function is a variant of <a class="link" href="glib-I18N.html#g-dgettext" title="g_dgettext ()"><code class="function">g_dgettext()</code></a> which supports
422
475
a disambiguating message context. GNU gettext uses the
432
485
</p>
433
486
<p>
434
487
Applications should normally not use this function directly,
435
 
but use the <a class="link" href="glib-I18N.html#C---CAPS" title="C_()"><code class="function">C_()</code></a> macro for translations with context.</p>
436
 
<p>
437
 
</p>
 
488
but use the <a class="link" href="glib-I18N.html#C-:CAPS" title="C_()"><code class="function">C_()</code></a> macro for translations with context.</p>
438
489
<div class="variablelist"><table border="0">
439
490
<col align="left" valign="top">
440
491
<tbody>
441
492
<tr>
442
493
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
443
 
<td> the translation domain to use, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> to use
 
494
<td> the translation domain to use, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to use
444
495
  the domain set with <code class="function">textdomain()</code>
445
496
</td>
446
497
</tr>
468
519
<hr>
469
520
<div class="refsect2" title="g_dpgettext2 ()">
470
521
<a name="g-dpgettext2"></a><h3>g_dpgettext2 ()</h3>
471
 
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *       g_dpgettext2                        (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *domain,
472
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *context,
473
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *msgid);</pre>
 
522
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *       g_dpgettext2                        (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *domain,
 
523
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *context,
 
524
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *msgid);</pre>
474
525
<p>
475
526
This function is a variant of <a class="link" href="glib-I18N.html#g-dgettext" title="g_dgettext ()"><code class="function">g_dgettext()</code></a> which supports
476
527
a disambiguating message context. GNU gettext uses the
482
533
with <code class="function">dgettext()</code> proper.
483
534
</p>
484
535
<p>
485
 
This function differs from <a class="link" href="glib-I18N.html#C---CAPS" title="C_()"><code class="function">C_()</code></a> in that it is not a macro and 
 
536
This function differs from <a class="link" href="glib-I18N.html#C-:CAPS" title="C_()"><code class="function">C_()</code></a> in that it is not a macro and 
486
537
thus you may use non-string-literals as context and msgid arguments.</p>
487
 
<p>
488
 
</p>
489
538
<div class="variablelist"><table border="0">
490
539
<col align="left" valign="top">
491
540
<tbody>
492
541
<tr>
493
542
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
494
 
<td> the translation domain to use, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> to use
 
543
<td> the translation domain to use, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to use
495
544
  the domain set with <code class="function">textdomain()</code>
496
545
</td>
497
546
</tr>
518
567
<hr>
519
568
<div class="refsect2" title="g_strip_context ()">
520
569
<a name="g-strip-context"></a><h3>g_strip_context ()</h3>
521
 
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *       g_strip_context                     (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *msgid,
522
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *msgval);</pre>
523
 
<p>
524
 
An auxiliary function for <code class="function">gettext()</code> support (see <a class="link" href="glib-I18N.html#Q---CAPS" title="Q_()"><code class="function">Q_()</code></a>).</p>
525
 
<p>
526
 
</p>
 
570
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *       g_strip_context                     (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *msgid,
 
571
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *msgval);</pre>
 
572
<p>
 
573
An auxiliary function for <code class="function">gettext()</code> support (see <a class="link" href="glib-I18N.html#Q-:CAPS" title="Q_()"><code class="function">Q_()</code></a>).</p>
527
574
<div class="variablelist"><table border="0">
528
575
<col align="left" valign="top">
529
576
<tbody>
552
599
<hr>
553
600
<div class="refsect2" title="g_get_language_names ()">
554
601
<a name="g-get-language-names"></a><h3>g_get_language_names ()</h3>
555
 
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a>* const * g_get_language_names               (void);</pre>
 
602
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a>* const * g_get_language_names               (void);</pre>
556
603
<p>
557
604
Computes a list of applicable locale names, which can be used to 
558
605
e.g. construct locale-dependent filenames or search paths. The returned 
567
614
This function consults the environment variables <code class="envar">LANGUAGE</code>, 
568
615
<code class="envar">LC_ALL</code>, <code class="envar">LC_MESSAGES</code> and <code class="envar">LANG</code> 
569
616
to find the list of locales specified by the user.</p>
570
 
<p>
571
 
</p>
572
617
<div class="variablelist"><table border="0">
573
618
<col align="left" valign="top">
574
619
<tbody><tr>
575
620
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
576
 
<td> a <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated array of strings owned by GLib 
 
621
<td> a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated array of strings owned by GLib 
577
622
   that must not be modified or freed.
578
623
 
579
624
</td>
591
636
</div>
592
637
<div class="footer">
593
638
<hr>
594
 
          Generated by GTK-Doc V1.11</div>
 
639
          Generated by GTK-Doc V1.13</div>
595
640
</body>
596
 
</html>
 
641
</html>
 
 
b'\\ No newline at end of file'