mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-28 21:22:11 +01:00
2008-05-17 Yair Hershkovitz <yairhr@gmail.com> * glib/glib.symbols: * glib/gi18n.h: Added g_disable_setlocale(). * glib/gi18n.c: Added g_disable_setlocale() API to disable setting the locale in g_i18n_init(). Dont disable translations if textdomain was not set before calling g_i18n_init(). Dont disable translations if the locale is "C". svn path=/trunk/; revision=6894
51 lines
1.7 KiB
C
51 lines
1.7 KiB
C
/* GLIB - Library of useful routines for C programming
|
|
* Copyright (C) 1995-1997, 2002 Peter Mattis, Red Hat, Inc.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
* Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
#ifndef __G_I18N_H__
|
|
#define __G_I18N_H__
|
|
|
|
#include <glib.h>
|
|
|
|
#include <libintl.h>
|
|
|
|
#if !defined(__G_I18N_LIB_H__) && !defined(__GLIBINTL_H__)
|
|
#define _(String) g_gettext (String)
|
|
#define Q_(String) g_dpgettext (NULL, String, 0)
|
|
#define N_(String) (String)
|
|
#define C_(Context,String) g_dpgettext (NULL, Context "\004" String, strlen (Context) + 1)
|
|
#endif
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
G_CONST_RETURN gchar *g_gettext (const gchar *msgid);
|
|
|
|
G_CONST_RETURN gchar *g_dgettext (const gchar *domain,
|
|
const gchar *msgid);
|
|
|
|
G_CONST_RETURN gchar *g_dpgettext (const gchar *domain,
|
|
const gchar *msgctxtid,
|
|
gsize msgidoffset);
|
|
|
|
void g_i18n_init (void);
|
|
void g_disable_setlocale (void);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __G_I18N_H__ */
|