2 * "$Id: language.h,v 1.21 2002/01/27 21:16:11 mike Exp $"
4 * Multi-language support for the Common UNIX Printing System (CUPS).
6 * Copyright 1997-2002 by Easy Software Products.
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
15 * Attn: CUPS Licensing Information
16 * Easy Software Products
17 * 44141 Airport View Drive, Suite 204
18 * Hollywood, Maryland 20636-3111 USA
20 * Voice: (301) 373-9603
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
25 #ifndef _CUPS_LANGUAGE_H_
26 # define _CUPS_LANGUAGE_H_
29 * Include necessary headers...
36 # endif /* __cplusplus */
42 typedef enum /**** Message Indices ****/
72 CUPS_MSG_ENTIRE_DOCUMENT
,
74 CUPS_MSG_REVERSE_ORDER
,
79 CUPS_MSG_IMAGE_SCALING
,
80 CUPS_MSG_USE_NATURAL_IMAGE_SIZE
,
81 CUPS_MSG_ZOOM_BY_PERCENT
,
83 CUPS_MSG_MIRROR_IMAGE
,
84 CUPS_MSG_COLOR_SATURATION
,
88 CUPS_MSG_DEFAULT_PEN_WIDTH
,
89 CUPS_MSG_GAMMA_CORRECTION
,
95 CUPS_MSG_PRINTER_NAME
,
96 CUPS_MSG_PRINTER_LOCATION
,
97 CUPS_MSG_PRINTER_INFO
,
98 CUPS_MSG_PRINTER_MAKE_AND_MODEL
,
100 CUPS_MSG_FORMATTING_PAGE
,
101 CUPS_MSG_PRINTING_PAGE
,
102 CUPS_MSG_INITIALIZING_PRINTER
,
103 CUPS_MSG_PRINTER_STATE
,
104 CUPS_MSG_ACCEPTING_JOBS
,
105 CUPS_MSG_NOT_ACCEPTING_JOBS
,
112 CUPS_MSG_FAST_COPIES
,
113 CUPS_MSG_COLLATED_COPIES
,
128 CUPS_MSG_DARKER_LIGHTER
,
131 CUPS_MSG_MEDIA_SOURCE
,
132 CUPS_MSG_ORIENTATION
,
142 CUPS_MSG_OUTPUT_MODE
,
145 CUPS_MSG_PRETTYPRINT
,
153 CUPS_MSG_HTTP_BASE
= 200,
154 CUPS_MSG_HTTP_END
= 505,
158 typedef enum /**** Language Encodings ****/
187 typedef struct cups_lang_str
/**** Language Cache Structure ****/
189 struct cups_lang_str
*next
; /* Next language in cache */
190 int used
; /* Number of times this entry has been used. */
191 cups_encoding_t encoding
; /* Text encoding */
192 char language
[16]; /* Language/locale name */
193 char *messages
[CUPS_MSG_MAX
];
202 # if defined(WIN32) || defined(__EMX__)
203 # define cupsLangDefault() cupsLangGet(setlocale(LC_ALL, ""))
205 # define cupsLangDefault() cupsLangGet(setlocale(LC_MESSAGES, ""))
206 # endif /* WIN32 || __EMX__ */
208 extern char *cupsLangEncoding(cups_lang_t
*lang
);
209 extern void cupsLangFlush(void);
210 extern void cupsLangFree(cups_lang_t
*lang
);
211 extern cups_lang_t
*cupsLangGet(const char *language
);
212 # define cupsLangString(lang,msg) (lang)->messages[(msg)]
216 # endif /* __cplusplus */
218 #endif /* !_CUPS_LANGUAGE_H_ */
221 * End of "$Id: language.h,v 1.21 2002/01/27 21:16:11 mike Exp $".