forked from AuroraMiddleware/gtk
Mention bind_textdomain_codeset in faq
svn path=/trunk/; revision=20795
This commit is contained in:
parent
0950b2aa73
commit
f53a77895b
@ -1,3 +1,9 @@
|
|||||||
|
2008-07-06 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
Bug 488019 - Mention bind_textdomain_codeset in gettext related FAQ
|
||||||
|
|
||||||
|
* gtk/question_index.sgml: Mention bind_textdomain_codeset()
|
||||||
|
|
||||||
2008-07-05 Matthias Clasen <mclasen@redhat.com>
|
2008-07-05 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* === Released 2.13.4 ===
|
* === Released 2.13.4 ===
|
||||||
|
@ -190,9 +190,10 @@ to read the documentation.
|
|||||||
<para>
|
<para>
|
||||||
The short checklist on how to use gettext is: call bindtextdomain() so gettext
|
The short checklist on how to use gettext is: call bindtextdomain() so gettext
|
||||||
can find the files containing your translations, call textdomain() to set the
|
can find the files containing your translations, call textdomain() to set the
|
||||||
default translation domain, then call gettext() to look up each string to be
|
default translation domain, call bind_textdomain_codeset() to request that
|
||||||
translated in the default domain. Conventionally, people define macros as
|
all translated strings are returned in UTF-8, then call gettext() to look up
|
||||||
follows for convenience:
|
each string to be translated in the default domain.
|
||||||
|
Conventionally, people define macros as follows for convenience:
|
||||||
<informalexample>
|
<informalexample>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
#define _(x) gettext (x)
|
#define _(x) gettext (x)
|
||||||
@ -354,6 +355,11 @@ g_print(text);
|
|||||||
g_free (text);
|
g_free (text);
|
||||||
</programlisting></informalexample>
|
</programlisting></informalexample>
|
||||||
</para>
|
</para>
|
||||||
|
<para>
|
||||||
|
If you are using gettext() to localize your application, you need to
|
||||||
|
call bind_textdomain_codeset() to ensure that translated strings are
|
||||||
|
returned in UTF-8 encoding.
|
||||||
|
</para>
|
||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user