summaryrefslogtreecommitdiff
path: root/src/I18n.hh
diff options
context:
space:
mode:
authorrathnor <rathnor>2004-06-07 11:46:05 (GMT)
committerrathnor <rathnor>2004-06-07 11:46:05 (GMT)
commitfff4456dee29e675d7f2ed3490db39bcb7e10e53 (patch)
tree2d2dbf386551773cbdc8231b2a93b493187bd733 /src/I18n.hh
parent073065ac56b388db1169108d44f37d32f1d19c67 (diff)
downloadfluxbox_lack-fff4456dee29e675d7f2ed3490db39bcb7e10e53.zip
fluxbox_lack-fff4456dee29e675d7f2ed3490db39bcb7e10e53.tar.bz2
update NLS string handling...
Diffstat (limited to 'src/I18n.hh')
-rw-r--r--src/I18n.hh83
1 files changed, 0 insertions, 83 deletions
diff --git a/src/I18n.hh b/src/I18n.hh
deleted file mode 100644
index 09c0b41..0000000
--- a/src/I18n.hh
+++ /dev/null
@@ -1,83 +0,0 @@
1// i18n.hh for Fluxbox Window Manager
2// Copyright (c) 2001 - 2002 Henrik Kinnunen (fluxgen@linuxmail.org)
3//
4// i18n.hh for Blackbox - an X11 Window manager
5// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
6//
7// Permission is hereby granted, free of charge, to any person obtaining a
8// copy of this software and associated documentation files (the "Software"),
9// to deal in the Software without restriction, including without limitation
10// the rights to use, copy, modify, merge, publish, distribute, sublicense,
11// and/or sell copies of the Software, and to permit persons to whom the
12// Software is furnished to do so, subject to the following conditions:
13//
14// The above copyright notice and this permission notice shall be included in
15// all copies or substantial portions of the Software.
16//
17// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE.
24
25// $Id: I18n.hh,v 1.4 2004/05/02 20:46:43 fluxgen Exp $
26
27#ifndef I18N_HH
28#define I18N_HH
29
30#include "../nls/fluxbox-nls.hh"
31
32#ifdef HAVE_CONFIG_H
33#include "config.h"
34#endif // HAVE_CONFIG_H
35
36
37#ifdef HAVE_LOCALE_H
38#include <locale.h>
39#endif // HAVE_LOCALE_H
40
41#ifdef HAVE_NL_TYPES_H
42// this is needed for linux libc5 systems
43extern "C" {
44#include <nl_types.h>
45}
46#elif defined(__CYGWIN__)
47#ifdef __cplusplus
48extern "C" {
49#endif // __cplusplus
50typedef int nl_catd;
51char *catgets(nl_catd cat, int set_number, int message_number, char *message);
52nl_catd catopen(char *name, int flag);
53void catclose(nl_catd cat);
54#ifdef __cplusplus
55}
56#endif // __cplusplus
57
58#endif // HAVE_NL_TYPES_H
59
60#include <string>
61
62class I18n {
63public:
64 static I18n *instance();
65 inline const char *getLocale() const { return m_locale.c_str(); }
66 inline bool multibyte() const { return m_multibyte; }
67 inline const nl_catd &getCatalogFd() const { return m_catalog_fd; }
68
69 const char *getMessage(int set_number, int message_number,
70 const char *default_messsage = 0) const;
71 void openCatalog(const char *catalog);
72private:
73 I18n();
74 ~I18n();
75 std::string m_locale;
76 bool m_multibyte;
77 nl_catd m_catalog_fd;
78
79};
80
81void NLSInit(const char *);
82
83#endif // I18N_HH