news download themes documentation links










I18n.hh

00001 // i18n.hh for Fluxbox Window Manager
00002 // Copyright (c) 2001 - 2002 Henrik Kinnunen (fluxgen@linuxmail.org)
00003 //
00004 // i18n.hh for Blackbox - an X11 Window manager
00005 // Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
00006 //
00007 // Permission is hereby granted, free of charge, to any person obtaining a
00008 // copy of this software and associated documentation files (the "Software"),
00009 // to deal in the Software without restriction, including without limitation
00010 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
00011 // and/or sell copies of the Software, and to permit persons to whom the
00012 // Software is furnished to do so, subject to the following conditions:
00013 //
00014 // The above copyright notice and this permission notice shall be included in
00015 // all copies or substantial portions of the Software.
00016 //
00017 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00018 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00019 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00020 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00021 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00022 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00023 // DEALINGS IN THE SOFTWARE.
00024 
00025 // $Id: I18n.hh,v 1.2 2003/12/08 17:29:24 fluxgen Exp $
00026 
00027 #ifndef  I18N_HH
00028 #define  I18N_HH
00029 
00030 #include "../nls/blackbox-nls.hh"
00031 
00032 #ifdef HAVE_CONFIG_H
00033 #include "config.h"
00034 #endif // HAVE_CONFIG_H
00035 
00036 #ifdef HAVE_LOCALE_H
00037 #include <locale.h>
00038 #endif // HAVE_LOCALE_H
00039 
00040 #ifdef HAVE_NL_TYPES_H
00041 // this is needed for linux libc5 systems
00042 extern "C" {
00043 #include <nl_types.h>
00044 }
00045 #endif // HAVE_NL_TYPES_H
00046 
00047 #include <string>
00048 
00049 class I18n {
00050 public:
00051     static I18n *instance();
00052     inline const char *getLocale() const { return m_locale.c_str(); }
00053     inline bool multibyte() const { return m_multibyte; }
00054     inline const nl_catd &getCatalogFd() const { return m_catalog_fd; }
00055 
00056     const char *getMessage(int set_number, int message_number, 
00057                            const char *default_messsage = 0) const;
00058     void openCatalog(const char *catalog);
00059 private:
00060     I18n();
00061     ~I18n();
00062     std::string m_locale;
00063     bool m_multibyte;
00064     nl_catd m_catalog_fd;
00065 
00066 };
00067 
00068 void NLSInit(const char *);
00069 
00070 #endif // I18N_HH

Fluxbox CVS-Jan-2003




      



Got comments about the page? Send them to webmaster.
If you have general Fluxbox related questions ask them on our irc channel or mailing lists.

Show Source








Designed by aLEczapKA