1 /* $Id$ */
2 /*-
3 * Copyright (c) 2006 Benedikt Meurer <benny@xfce.org>
4 * All rights reserved.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free
18 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301 USA
20 */
21
22 #ifdef HAVE_CONFIG_H
23 #include <config.h>
24 #endif
25
26 #ifdef HAVE_LIBINTL_H
27 #include <libintl.h>
28 #endif
29 #ifdef HAVE_LOCALE_H
30 #include <locale.h>
31 #endif
32
33 #include <libxfce4util/libxfce4util-private.h>
34 #include <libxfce4util/libxfce4util-alias.h>
35
36
37
38 /**
39 * _xfce_i18n_init:
40 *
41 * Initializes the libxfce4util i18n support. We don't call
42 * xfce_textdomain() here because we don't want to become the
43 * default domain for future gettext() calls (which is what
44 * textdomain does), because then we break apps that make
45 * gettext calls afterwards.
46 **/
47 void
_xfce_i18n_init(void)48 _xfce_i18n_init (void)
49 {
50 static gboolean inited = FALSE;
51
52 if (G_UNLIKELY (!inited))
53 {
54 inited = TRUE;
55
56 /* bind the text domain for the package to the given directory */
57 bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
58
59 /* setup the encoding for the package */
60 #ifdef HAVE_BIND_TEXTDOMAIN_CODESET
61 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
62 #endif
63 }
64 }
65
66
67
68 #define __LIBXFCE4UTIL_PRIVATE_C__
69 #include <libxfce4util/libxfce4util-aliasdef.c>
70