The SWORD Project  1.9.0.svnversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
swlocale.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * swlocale.h - class SWLocale: localization functionality
4  *
5  * $Id: swlocale.h 3786 2020-08-30 11:35:14Z scribe $
6  *
7  * Copyright 2000-2013 CrossWire Bible Society (http://www.crosswire.org)
8  * CrossWire Bible Society
9  * P. O. Box 2528
10  * Tempe, AZ 85280-2528
11  *
12  * This program is free software; you can redistribute it and/or modify it
13  * under the terms of the GNU General Public License as published by the
14  * Free Software Foundation version 2.
15  *
16  * This program is distributed in the hope that it will be useful, but
17  * WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * General Public License for more details.
20  *
21  */
22 
23 #ifndef SWLOCALE_H
24 #define SWLOCALE_H
25 
26 #include <defs.h>
27 
29 
30 class SWConfig;
31 static const int ENDOFABBREVS = -2;
32 
40 
41 private:
42 
43 class Private;
44 
45  Private *p;
46 
48 
49  char *name;
50  char *description;
51  char *encoding;
54  const char **bookLongNames;
55  const char **bookPrefAbbrev;
56 
57 public:
58  SWLocale(const char *ifilename);
59  virtual ~SWLocale();
60 
65  virtual const char *getName();
69  virtual const char *getDescription();
70  virtual const char *getEncoding();
71  virtual const char *translate(const char *text);
72  virtual void augment(SWLocale &addFrom);
73  virtual SWLocale & operator +=(SWLocale &addFrom) { augment(addFrom); return *this; }
74  virtual const struct abbrev *getBookAbbrevs(int *retSize);
75  static const char *DEFAULT_LOCALE_NAME;
76 };
77 
79 #endif
#define SWORD_NAMESPACE_START
Definition: defs.h:39
Private * p
Definition: swlocale.h:43
#define SWDLLEXPORT
Definition: defs.h:171
char * name
Definition: swlocale.h:49
else preg translate
Definition: regex.c:8111
int abbrevsCnt
Definition: swlocale.h:53
static const char * DEFAULT_LOCALE_NAME
Definition: swlocale.h:75
char * encoding
Definition: swlocale.h:51
struct abbrev * bookAbbrevs
Definition: swlocale.h:52
char * description
Definition: swlocale.h:50
SWConfig * localeSource
Definition: swlocale.h:47
const char ** bookPrefAbbrev
Definition: swlocale.h:55
#define SWORD_NAMESPACE_END
Definition: defs.h:40
const char ** bookLongNames
Definition: swlocale.h:54
static const int ENDOFABBREVS
Definition: swlocale.h:31