00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef SWLOCALE_H
00024 #define SWLOCALE_H
00025
00026 #include <defs.h>
00027
00028 SWORD_NAMESPACE_START
00029
00030 class SWConfig;
00031 static const int ENDOFABBREVS = -2;
00032
00039 class SWDLLEXPORT SWLocale {
00040
00041 class Private;
00042
00043 Private *p;
00044
00045 SWConfig *localeSource;
00046
00047 char *name;
00048 char *description;
00049 char *encoding;
00050 struct abbrev *bookAbbrevs;
00051 char *BMAX;
00052 struct sbook **books;
00053
00054 public:
00055 SWLocale(const char *ifilename);
00056 virtual ~SWLocale();
00057
00062 virtual const char *getName();
00066 virtual const char *getDescription();
00067 virtual const char *getEncoding();
00068 virtual const char *translate(const char *text);
00069 virtual void augment(SWLocale &addFrom);
00070 virtual SWLocale & operator +=(SWLocale &addFrom) { augment(addFrom); return *this; }
00071 virtual const struct abbrev *getBookAbbrevs();
00072 virtual void getBooks(char **iBMAX, struct sbook ***ibooks);
00073 };
00074
00075 SWORD_NAMESPACE_END
00076 #endif