]>
Commit | Line | Data |
---|---|---|
46b7e58a | 1 | /* |
c9d3f842 | 2 | * "$Id$" |
46b7e58a | 3 | * |
4 | * Multi-language support for the Common UNIX Printing System (CUPS). | |
5 | * | |
24c1b5ce | 6 | * Copyright 1997-2006 by Easy Software Products. |
46b7e58a | 7 | * |
8 | * These coded instructions, statements, and computer programs are the | |
9 | * property of Easy Software Products and are protected by Federal | |
10 | * copyright law. Distribution and use rights are outlined in the file | |
11 | * "LICENSE.txt" which should have been included with this file. If this | |
12 | * file is missing or damaged please contact Easy Software Products | |
13 | * at: | |
14 | * | |
15 | * Attn: CUPS Licensing Information | |
16 | * Easy Software Products | |
8784b6a6 | 17 | * 44141 Airport View Drive, Suite 204 |
c9d3f842 | 18 | * Hollywood, Maryland 20636 USA |
46b7e58a | 19 | * |
c4dcf3cc | 20 | * Voice: (301) 373-9600 |
46b7e58a | 21 | * EMail: cups-info@cups.org |
22 | * WWW: http://www.cups.org | |
dab1a4d8 | 23 | * |
24 | * This file is subject to the Apple OS-Developed Software exception. | |
46b7e58a | 25 | */ |
26 | ||
91e6c295 | 27 | #ifndef _CUPS_LANGUAGE_H_ |
28 | # define _CUPS_LANGUAGE_H_ | |
29 | ||
46b7e58a | 30 | /* |
31 | * Include necessary headers... | |
32 | */ | |
33 | ||
91e6c295 | 34 | # include <locale.h> |
a501ad17 | 35 | # include "array.h" |
46b7e58a | 36 | |
91e6c295 | 37 | # ifdef __cplusplus |
38 | extern "C" { | |
39 | # endif /* __cplusplus */ | |
46b7e58a | 40 | |
a501ad17 | 41 | |
46b7e58a | 42 | /* |
a501ad17 | 43 | * Types... |
46b7e58a | 44 | */ |
45 | ||
a501ad17 | 46 | typedef enum cups_encoding_e /**** Language Encodings ****/ |
46b7e58a | 47 | { |
a501ad17 | 48 | CUPS_AUTO_ENCODING = -1, /* Auto-detect the encoding @private@ */ |
49 | CUPS_US_ASCII, /* US ASCII */ | |
50 | CUPS_ISO8859_1, /* ISO-8859-1 */ | |
51 | CUPS_ISO8859_2, /* ISO-8859-2 */ | |
52 | CUPS_ISO8859_3, /* ISO-8859-3 */ | |
53 | CUPS_ISO8859_4, /* ISO-8859-4 */ | |
54 | CUPS_ISO8859_5, /* ISO-8859-5 */ | |
55 | CUPS_ISO8859_6, /* ISO-8859-6 */ | |
56 | CUPS_ISO8859_7, /* ISO-8859-7 */ | |
57 | CUPS_ISO8859_8, /* ISO-8859-8 */ | |
58 | CUPS_ISO8859_9, /* ISO-8859-9 */ | |
59 | CUPS_ISO8859_10, /* ISO-8859-10 */ | |
60 | CUPS_UTF8, /* UTF-8 */ | |
61 | CUPS_ISO8859_13, /* ISO-8859-13 */ | |
62 | CUPS_ISO8859_14, /* ISO-8859-14 */ | |
63 | CUPS_ISO8859_15, /* ISO-8859-15 */ | |
64 | CUPS_WINDOWS_874, /* CP-874 */ | |
65 | CUPS_WINDOWS_1250, /* CP-1250 */ | |
66 | CUPS_WINDOWS_1251, /* CP-1251 */ | |
67 | CUPS_WINDOWS_1252, /* CP-1252 */ | |
68 | CUPS_WINDOWS_1253, /* CP-1253 */ | |
69 | CUPS_WINDOWS_1254, /* CP-1254 */ | |
70 | CUPS_WINDOWS_1255, /* CP-1255 */ | |
71 | CUPS_WINDOWS_1256, /* CP-1256 */ | |
72 | CUPS_WINDOWS_1257, /* CP-1257 */ | |
73 | CUPS_WINDOWS_1258, /* CP-1258 */ | |
74 | CUPS_KOI8_R, /* KOI-8-R */ | |
75 | CUPS_KOI8_U, /* KOI-8-U */ | |
76 | CUPS_ISO8859_11, /* ISO-8859-11 */ | |
77 | CUPS_ISO8859_16, /* ISO-8859-16 */ | |
cf0959e5 | 78 | CUPS_MAC_ROMAN, /* MacRoman */ |
a501ad17 | 79 | CUPS_ENCODING_SBCS_END = 63, /* End of single-bybte encodings @private@ */ |
80 | ||
81 | CUPS_WINDOWS_932, /* Japanese JIS X0208-1990 */ | |
82 | CUPS_WINDOWS_936, /* Simplified Chinese GB 2312-80 */ | |
83 | CUPS_WINDOWS_949, /* Korean KS C5601-1992 */ | |
84 | CUPS_WINDOWS_950, /* Traditional Chinese Big Five */ | |
85 | CUPS_WINDOWS_1361, /* Korean Johab */ | |
86 | CUPS_ENCODING_DBCS_END = 127, /* End of double-byte encodings @private@ */ | |
87 | ||
88 | CUPS_EUC_CN, /* EUC Simplified Chinese */ | |
89 | CUPS_EUC_JP, /* EUC Japanese */ | |
90 | CUPS_EUC_KR, /* EUC Korean */ | |
91 | CUPS_EUC_TW, /* EUC Traditional Chinese */ | |
92 | CUPS_ENCODING_VBCS_END = 191 /* End of variable-length encodings @private@ */ | |
46b7e58a | 93 | } cups_encoding_t; |
94 | ||
a501ad17 | 95 | typedef struct cups_lang_s /**** Language Cache Structure ****/ |
46b7e58a | 96 | { |
a501ad17 | 97 | struct cups_lang_s *next; /* Next language in cache */ |
46b7e58a | 98 | int used; /* Number of times this entry has been used. */ |
99 | cups_encoding_t encoding; /* Text encoding */ | |
100 | char language[16]; /* Language/locale name */ | |
a501ad17 | 101 | cups_array_t *strings; /* Message strings @private@ */ |
46b7e58a | 102 | } cups_lang_t; |
103 | ||
104 | ||
105 | /* | |
106 | * Prototypes... | |
107 | */ | |
108 | ||
a501ad17 | 109 | extern cups_lang_t *cupsLangDefault(void); |
c5061b15 | 110 | extern const char *cupsLangEncoding(cups_lang_t *lang); |
46b7e58a | 111 | extern void cupsLangFlush(void); |
112 | extern void cupsLangFree(cups_lang_t *lang); | |
063e1ac7 | 113 | extern cups_lang_t *cupsLangGet(const char *language); |
f3e786fc | 114 | |
91e6c295 | 115 | # ifdef __cplusplus |
116 | } | |
117 | # endif /* __cplusplus */ | |
118 | ||
119 | #endif /* !_CUPS_LANGUAGE_H_ */ | |
46b7e58a | 120 | |
121 | /* | |
c9d3f842 | 122 | * End of "$Id$". |
46b7e58a | 123 | */ |