NetSurf
gettext.c
Go to the documentation of this file.
1/*
2 * Copyright 2013 Vincent Sanders <vince@kyllikki.org>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19/** \file
20 * Localised gettext message support (implementation).
21 *
22 * Wrappers for gettext to the internal native language message support.
23 */
24
25#include <stdlib.h>
26
27#include "utils/messages.h"
28#include "gtk/gettext.h"
29
30char *gettext(const char *msgid)
31{
32 return dcgettext(NULL, msgid, 0);
33}
34
35char *dgettext(const char *domainname, const char *msgid)
36{
37 return dcgettext(domainname, msgid, 0);
38}
39
40char *dcgettext(const char *domainname, const char *msgid, int category)
41{
42 return (void *)messages_get(msgid);
43}
char * dcgettext(const char *domainname, const char *msgid, int category)
Definition: gettext.c:40
char * gettext(const char *msgid)
Definition: gettext.c:30
char * dgettext(const char *domainname, const char *msgid)
Definition: gettext.c:35
Localised message support (interface).
const char * messages_get(const char *key)
Fast lookup of a message by key from the standard Messages hash.
Definition: messages.c:241
Localised message support (interface).