X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fi18n.h;h=d8d29a4a080533dba2b1a911ebd8fdf6ea6ad9f7;hb=935b35c6a6746b748155351558496604759baae4;hp=b074b2ffa7ecb3c2edeec6f2c865d7a12d416252;hpb=dfc5f034581f5a26cba5c4811500438f89f0634a;p=chaz%2Fopenbox diff --git a/src/i18n.h b/src/i18n.h index b074b2ff..d8d29a4a 100644 --- a/src/i18n.h +++ b/src/i18n.h @@ -1,5 +1,6 @@ -// i18n.h for Openbox -// Copyright (c) 2001 Sean 'Shaleh' Perry +// -*- mode: C++; indent-tabs-mode: nil; -*- +// i18n.hh for Openbox +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry // Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) // // Permission is hereby granted, free of charge, to any person obtaining a @@ -28,39 +29,35 @@ // add ifdefs to every call to getMessage #include "../nls/openbox-nls.h" +extern "C" { #ifdef HAVE_LOCALE_H # include #endif // HAVE_LOCALE_H #ifdef HAVE_NL_TYPES_H -extern "C" { # include -} #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