aboutsummaryrefslogtreecommitdiff
path: root/src/i18n.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/i18n.hh')
-rw-r--r--src/i18n.hh44
1 files changed, 17 insertions, 27 deletions
diff --git a/src/i18n.hh b/src/i18n.hh
index dca2cde..05f1339 100644
--- a/src/i18n.hh
+++ b/src/i18n.hh
@@ -22,14 +22,12 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: i18n.hh,v 1.6 2002/03/18 15:46:42 fluxgen Exp $ 25// $Id: i18n.hh,v 1.7 2002/04/04 00:21:48 fluxgen Exp $
26 26
27#ifndef I18N_HH 27#ifndef I18N_HH
28#define I18N_HH 28#define I18N_HH
29 29
30#ifdef NLS 30#include "../nls/blackbox-nls.hh"
31# include "../nls/blackbox-nls.hh"
32#endif // NLS
33 31
34#ifdef HAVE_LOCALE_H 32#ifdef HAVE_LOCALE_H
35# include <locale.h> 33# include <locale.h>
@@ -46,34 +44,26 @@ extern "C" {
46# include "nl_types_cygnus.h" 44# include "nl_types_cygnus.h"
47#endif 45#endif
48 46
49class I18n { 47#include <string>
50private:
51 char *locale, *catalog_filename;
52 int mb;
53 nl_catd catalog_fd;
54 48
55 49class I18n {
56protected:
57 I18n(void);
58
59public: 50public:
60 //so old compilators dont complain
61 ~I18n(void);
62
63 static I18n *instance(); 51 static I18n *instance();
64 inline const char *getLocale(void) const { return locale; } 52 inline const char *getLocale(void) const { return m_locale.c_str(); }
65 inline const char *getCatalogFilename(void) const { return catalog_filename; } 53 inline bool multibyte(void) const { return m_multibyte; }
66 54 inline const nl_catd &getCatalogFd(void) const { return m_catalog_fd; }
67 inline const int multibyte(void) const { return mb; }
68 55
69 inline const nl_catd &getCatalogFd(void) const { return catalog_fd; } 56 const char *getMessage(int set_number, int message_number, const char *default_messsage = 0);
70
71 const char *getMessage(int, int, const char * = 0);
72 void openCatalog(const char *); 57 void openCatalog(const char *);
73}; 58private:
59 I18n();
60 ~I18n();
61 std::string m_locale;
62 bool m_multibyte;
63 nl_catd m_catalog_fd;
74 64
65};
75 66
76//extern I18n *i18n; 67void NLSInit(const char *);
77extern void NLSInit(const char *);
78 68
79#endif // __i18n_h 69#endif // I18N_HH