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