Nls.h
/*
* $Id: Nls.h 3025 2010-03-28 01:14:54Z karijes $
*
* Locale functions
* Copyright (c) 2005-2010 edelib authors
*
* 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef __EDELIB_NLS_H__
#define __EDELIB_NLS_H__
#include "edelib-global.h"
#ifdef USE_NLS
# include <libintl.h>
/*
* this definition is used when edelib library code is compiled, so we
* can get edelib specific translations from edelib mo file
*/
# ifdef USE_EDELIB_GETTEXT_DOMAIN
# define _(s) dgettext("edelib", s)
# else
# define _(s) gettext(s)
# endif
#else
# define textdomain(domain) ((const char*)domain)
# define bindtextdomain(domain, dir) ((const char*)dir)
# define bind_textdomain_codeset(domain, codeset) ((const char*)codeset)
# define _(s) (s)
#endif
#define N_(s) (s)
EDELIB_NS_BEGIN
EDELIB_API char* nls_locale_to_c(void);
EDELIB_API void nls_locale_from_c(char* old);
EDELIB_API void nls_support_init(const char* appname, const char* dir);
EDELIB_NS_END
#endif
edelib::nls_locale_from_c
void nls_locale_from_c(char *old)
edelib::nls_locale_to_c
char * nls_locale_to_c(void)
edelib::nls_support_init
void nls_support_init(const char *appname, const char *dir)