]> Dogcows Code - chaz/openbox/blobdiff - src/i18n.h
refix i18n for --disable-nls
[chaz/openbox] / src / i18n.h
index b074b2ffa7ecb3c2edeec6f2c865d7a12d416252..d8d29a4a080533dba2b1a911ebd8fdf6ea6ad9f7 100644 (file)
@@ -1,5 +1,6 @@
-// i18n.h for Openbox
-// Copyright (c) 2001 Sean 'Shaleh' Perry <shaleh@debian.org>
+// -*- mode: C++; indent-tabs-mode: nil; -*-
+// i18n.hh for Openbox
+// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh@debian.org>
 // Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
 //
 // Permission is hereby granted, free of charge, to any person obtaining a
 // add ifdefs to every call to getMessage
 #include "../nls/openbox-nls.h"
 
+extern "C" {
 #ifdef    HAVE_LOCALE_H
 #  include <locale.h>
 #endif // HAVE_LOCALE_H
 
 #ifdef    HAVE_NL_TYPES_H
-extern "C" {
 #  include <nl_types.h>
-}
 #endif // HAVE_NL_TYPES_H
+}
 
 
 class I18n {
 private:
-  char *locale, *catalog_filename;
+  char *locale;
   bool mb;
 #ifdef HAVE_NL_TYPES_H
   nl_catd catalog_fd;
 #endif
 
 public:
-  I18n(void);
-  ~I18n(void);
+  I18n(const char *catalog = 0);
+  ~I18n();
 
   inline bool multibyte(void) const { return mb; }
 
-  const char *getMessage(int set, int msg, const char *msgString) const;
+  const char* operator()(int set, int msg, const char *msgString) const;
   void openCatalog(const char *catalog);
 };
 
-
-extern I18n *i18n;
-extern void NLSInit(const char *);
-
-
+extern I18n i18n;       // located in main.cc
 
 #endif // __i18n_h
This page took 0.023267 seconds and 4 git commands to generate.