aboutsummaryrefslogtreecommitdiff
path: root/src/i18n.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/i18n.hh')
-rw-r--r--src/i18n.hh64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/i18n.hh b/src/i18n.hh
index a2b97b9..6daaddf 100644
--- a/src/i18n.hh
+++ b/src/i18n.hh
@@ -1,3 +1,6 @@
1// i18n.hh for Fluxbox Window Manager
2// Copyright (c) 2001 - 2002 Henrik Kinnunen (fluxgen@linuxmail.org)
3//
1// i18n.hh for Blackbox - an X11 Window manager 4// i18n.hh for Blackbox - an X11 Window manager
2// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) 5// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
3// 6//
@@ -19,53 +22,50 @@
19// 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
20// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
21 24
22#ifndef __i18n_h 25// $Id: i18n.hh,v 1.8 2002/05/24 13:24:02 fluxgen Exp $
23#define __i18n_h 26
27#ifndef I18N_HH
28#define I18N_HH
24 29
25#ifdef NLS 30#include "../nls/blackbox-nls.hh"
26# include "../nls/blackbox-nls.hh"
27#endif // NLS
28 31
29#ifdef HAVE_LOCALE_H 32#ifdef HAVE_LOCALE_H
30# include <locale.h> 33# include <locale.h>
31#endif // HAVE_LOCALE_H 34#endif // HAVE_LOCALE_H
32 35
33#ifdef HAVE_NL_TYPES_H 36#ifdef HAVE_NL_TYPES_H
34// this is needed for linux libc5 systems 37// this is needed for linux libc5 systems
35extern "C" { 38extern "C" {
36# include <nl_types.h> 39# include <nl_types.h>
37} 40}
41#else // HAVE_NL_TYPES_H
42#include "nl_types_cygnus.h"
38#endif // HAVE_NL_TYPES_H 43#endif // HAVE_NL_TYPES_H
39 44
45#ifdef __CYGWIN32__
46# include "nl_types_cygnus.h"
47#endif
40 48
41class I18n { 49#include <string>
42private:
43 char *locale, *catalog_filename;
44 int mb;
45 nl_catd catalog_fd;
46
47 50
48protected: 51class I18n {
49 I18n(void);
50
51public: 52public:
52 //so old compilators dont complain
53 ~I18n(void);
54
55 static I18n *instance(); 53 static I18n *instance();
56 inline const char *getLocale(void) const { return locale; } 54 inline const char *getLocale(void) const { return m_locale.c_str(); }
57 inline const char *getCatalogFilename(void) const { return catalog_filename; } 55 inline bool multibyte(void) const { return m_multibyte; }
58 56 inline const nl_catd &getCatalogFd(void) const { return m_catalog_fd; }
59 inline const int &multibyte(void) const { return mb; }
60 57
61 inline const nl_catd &getCatalogFd(void) const { return catalog_fd; } 58 const char *getMessage(int set_number, int message_number, const char *default_messsage = 0);
59 void openCatalog(const char *);
60private:
61 I18n();
62 ~I18n();
63 std::string m_locale;
64 bool m_multibyte;
65 nl_catd m_catalog_fd;
62 66
63 const char *getMessage(int, int, const char * = 0);
64 void openCatalog(const char *);
65}; 67};
66 68
69void NLSInit(const char *);
67 70
68//extern I18n *i18n; 71#endif // I18N_HH
69extern void NLSInit(const char *);
70
71#endif // __i18n_h