Revert "Add another convenience function allowing i18n_noops("foo")+"bar""
[libi2ncommon] / src / i18n.h
CommitLineData
0e23f538
TJ
1/*
2The software in this package is distributed under the GNU General
3Public License version 2 (with a special exception described below).
4
5A copy of GNU General Public License (GPL) is included in this distribution,
6in the file COPYING.GPL.
7
8As a special exception, if other files instantiate templates or use macros
9or inline functions from this file, or you compile this file and link it
10with other works to produce a work based on this file, this file
11does not by itself cause the resulting work to be covered
12by the GNU General Public License.
13
14However the source code for this file must still be made available
15in accordance with section (3) of the GNU General Public License.
16
17This exception does not invalidate any other reasons why a work based
18on this file might be covered by the GNU General Public License.
19*/
5ff2acd9
TJ
20/***************************************************************************
21 i18n.h - description
22 -------------------
23 begin : Wed Apr 25 2001
24 copyright : (C) 2001-2004 by Intra2net AG
5ff2acd9
TJ
25 ***************************************************************************/
26
27#ifndef intranator_i18n_H
28#define intranator_i18n_H
29
30#include <libintl.h>
31#include <string>
32#include <vector>
33
34#define i18n(String) gettext(String)
0f10aaca 35#define i18n_plural(String1, String2, Count) ngettext(String1, String2, Count)
5ff2acd9
TJ
36#define i18n_noop(String) (String)
37
38void i18n_init(const std::string& domain, const std::string& path=".");
39void i18n_set_language(const std::string &lang="");
40std::string i18n_get_current_language(void);
41std::string i18n_get_default_language(void);
42
5ff2acd9
TJ
43std::string i18n_get_string (const char *source, const std::vector<std::string> &data);
44std::string i18n_get_string (const std::string &source, const std::vector<std::string> &data);
e11a40a2
CH
45std::string i18n_get_string (const std::string &source, const std::string &arg0);
46std::string i18n_get_string (const std::string &source, const std::string &arg0, const std::string &arg1);
47std::string i18n_get_string (const std::string &source, const std::string &arg0, const std::string &arg1, const std::string &arg2);
5ff2acd9 48
9e2ff02c 49std::string i18n_locale2language(const std::string &locale);
5ff2acd9
TJ
50
51#endif