1
<refentry id="libgnome-gnome-i18n">
3
<refentrytitle role="top_of_page" id="libgnome-gnome-i18n.top_of_page">gnome-i18n</refentrytitle>
4
<manvolnum>3</manvolnum>
5
<refmiscinfo>LIBGNOME Library</refmiscinfo>
9
<refname>gnome-i18n</refname>
10
<refpurpose>Support for localization and internationalization.</refpurpose>
13
<refsynopsisdiv id="libgnome-gnome-i18n.synopsis" role="synopsis">
14
<title role="synopsis.title">Synopsis</title>
18
#include <libgnome/libgnome.h>
20
const <link linkend="GList">GList</link> * <link linkend="gnome-i18n-get-language-list">gnome_i18n_get_language_list</link> (const <link linkend="gchar">gchar</link> *category_name);
21
<link linkend="void">void</link> <link linkend="gnome-i18n-push-c-numeric-locale">gnome_i18n_push_c_numeric_locale</link> (void);
22
<link linkend="void">void</link> <link linkend="gnome-i18n-pop-c-numeric-locale">gnome_i18n_pop_c_numeric_locale</link> (void);
34
<refsect1 id="libgnome-gnome-i18n.description" role="desc">
35
<title role="desc.title">Description</title>
38
This module allows the programmer to internationalize his application by
39
providing functions to retrieve the preferred languages of the user as well as
40
temporarily move back to the C locale for performing locale independent
45
A lot of the internationalization functions which were in this module in
46
GNOME 1 have now moved to libbonobo for GNOME 2 (<link linkend="gettext-macro"><function>_()</function></link>, <link linkend="textdomain"><function>textdomain()</function></link>,
47
<link linkend="gettext"><function>gettext()</function></link>, etc).
52
<refsect1 id="libgnome-gnome-i18n.details" role="details">
53
<title role="details.title">Details</title>
54
<refsect2 id="gnome-i18n-get-language-list" role="function" condition="deprecated:">
55
<title>gnome_i18n_get_language_list ()</title>
56
<indexterm zone="gnome-i18n-get-language-list" role="deprecated"><primary>gnome_i18n_get_language_list</primary></indexterm>
57
<programlisting>const <link linkend="GList">GList</link> * gnome_i18n_get_language_list (const <link linkend="gchar">gchar</link> *category_name);</programlisting>
58
<warning><para><literal>gnome_i18n_get_language_list</literal> is deprecated and should not be used in newly-written code.</para></warning>
60
This function is deprecated. You should be using <link linkend="g-get-language-names"><function>g_get_language_names()</function></link> instead.
63
This computes a list of language strings that the user wants. It searches in
64
the standard environment variables to find the list, which is sorted in order
65
from most desirable to least desirable. The `C' locale is appended to the
66
list if it does not already appear (other routines depend on this
70
The <parameter>ignored</parameter> argument used to be the category name to use, but this was
71
removed since there is only one useful thing to pass here. For further
72
details, see http://bugzilla.gnome.org/show_bug.cgi?id=168948</para>
74
</para><variablelist role="params">
75
<varlistentry><term><parameter>category_name</parameter> :</term>
77
</simpara></listitem></varlistentry>
78
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the list of languages, this list should not be freed as it is
80
</simpara></listitem></varlistentry>
81
</variablelist></refsect2>
82
<refsect2 id="gnome-i18n-push-c-numeric-locale" role="function" condition="deprecated:">
83
<title>gnome_i18n_push_c_numeric_locale ()</title>
84
<indexterm zone="gnome-i18n-push-c-numeric-locale" role="deprecated"><primary>gnome_i18n_push_c_numeric_locale</primary></indexterm>
85
<programlisting><link linkend="void">void</link> gnome_i18n_push_c_numeric_locale (void);</programlisting>
86
<warning><para><literal>gnome_i18n_push_c_numeric_locale</literal> is deprecated and should not be used in newly-written code.</para></warning>
88
Saves the current LC_NUMERIC locale and sets it to "C"
89
This way you can safely read write floating point numbers all in the
90
same format. You should make sure that code between
91
<link linkend="gnome-i18n-push-c-numeric-locale"><function>gnome_i18n_push_c_numeric_locale()</function></link> and <link linkend="gnome-i18n-pop-c-numeric-locale"><function>gnome_i18n_pop_c_numeric_locale()</function></link>
92
doesn't do any setlocale calls or locale may end up in a strange setting.
93
Also make sure to always pop the c numeric locale after you've pushed it.
94
The calls can be nested.</para>
97
<refsect2 id="gnome-i18n-pop-c-numeric-locale" role="function" condition="deprecated:">
98
<title>gnome_i18n_pop_c_numeric_locale ()</title>
99
<indexterm zone="gnome-i18n-pop-c-numeric-locale" role="deprecated"><primary>gnome_i18n_pop_c_numeric_locale</primary></indexterm>
100
<programlisting><link linkend="void">void</link> gnome_i18n_pop_c_numeric_locale (void);</programlisting>
101
<warning><para><literal>gnome_i18n_pop_c_numeric_locale</literal> is deprecated and should not be used in newly-written code.</para></warning>
103
Restores the LC_NUMERIC locale to what it was
104
before the matching <link linkend="gnome-i18n-push-c-numeric-locale"><function>gnome_i18n_push_c_numeric_locale()</function></link>. If these calls
105
were nested, then this is a no-op until we get to the most outermost
106
layer. Code in between these should not do any setlocale calls
107
to change the LC_NUMERIC locale or things may come out very strange.</para>