Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, April 19, 2024

File: [Platon] / libco / libco / co_gettext.c (download)

Revision 1.3, Sun Mar 30 10:26:54 2003 UTC (21 years ago) by yenar


Changes since 1.2: +4 -0 lines

add some noop i18n strings for testing [co_gettext.c]

/***{{{*******************************************************************
 * This file is part of libco - object library for C                     *
 * Copyright (c) 2002                                                    *
 *     Peter Rockai (yenar) <yenar@host.sk>                              *
 *                                                                       *
 * 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                                            *
 *******************************************************************}}}***/
/* {{{ file description */
/**
 * @file co_gettext.c
 * @brief Simple GNU gettext wrapper.
 **/
/* }}} */

/* {{{ includes */
#include <locale.h>
#include <libintl.h>
#include <co_debug.h>
#include <co_gettext.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
/* }}} */

/* {{{ */
const char *co_i18n (const char *str)
{
    const char *ret;
    CO_DEBUG (20, "get: %s", str);
    ret = gettext (str);
    CO_DEBUG (20, "ret: %s", ret);
    return ret;
}
/* }}} */
/* {{{ */
void co_i18n_init (void)
{
    setlocale (LC_ALL, "");
    CO_DEBUG (2, "binding %s", LOCALEDIR);
    bindtextdomain (PACKAGE, LOCALEDIR);
    textdomain (PACKAGE);
}
/* }}} */

#define CO_I18N_NOOP(str)
CO_I18N_NOOP ("test")
CO_I18N_NOOP ("simple")

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top