]> git.ipfire.org Git - thirdparty/cups.git/blob - cups/language-private.h
Add media-type localizations for printer-specific media types (Issue #5168)
[thirdparty/cups.git] / cups / language-private.h
1 /*
2 * Private localization support for CUPS.
3 *
4 * Copyright 2007-2017 by Apple Inc.
5 * Copyright 1997-2006 by Easy Software Products.
6 *
7 * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
8 */
9
10 #ifndef _CUPS_LANGUAGE_PRIVATE_H_
11 # define _CUPS_LANGUAGE_PRIVATE_H_
12
13 /*
14 * Include necessary headers...
15 */
16
17 # include <stdio.h>
18 # include <cups/transcode.h>
19 # ifdef __APPLE__
20 # include <CoreFoundation/CoreFoundation.h>
21 # endif /* __APPLE__ */
22
23 # ifdef __cplusplus
24 extern "C" {
25 # endif /* __cplusplus */
26
27
28 /*
29 * Macro for localized text...
30 */
31
32 # define _(x) x
33
34
35 /*
36 * Constants...
37 */
38
39 # define _CUPS_MESSAGE_UNQUOTE 1 /* Unescape \foo in strings? */
40 # define _CUPS_MESSAGE_STRINGS 2 /* Message file is in Apple .strings format */
41
42
43 /*
44 * Types...
45 */
46
47 typedef struct _cups_message_s /**** Message catalog entry ****/
48 {
49 char *msg, /* Original string */
50 *str; /* Localized string */
51 } _cups_message_t;
52
53
54 /*
55 * Prototypes...
56 */
57
58 # ifdef __APPLE__
59 extern const char *_cupsAppleLanguage(const char *locale, char *language, size_t langsize);
60 extern const char *_cupsAppleLocale(CFStringRef languageName, char *locale, size_t localesize);
61 # endif /* __APPLE__ */
62 extern void _cupsCharmapFlush(void);
63 extern const char *_cupsEncodingName(cups_encoding_t encoding);
64 extern void _cupsLangPrintError(const char *prefix,
65 const char *message);
66 extern int _cupsLangPrintFilter(FILE *fp, const char *prefix,
67 const char *message, ...)
68 __attribute__ ((__format__ (__printf__, 3, 4)));
69 extern int _cupsLangPrintf(FILE *fp, const char *message, ...)
70 __attribute__ ((__format__ (__printf__, 2, 3)));
71 extern int _cupsLangPuts(FILE *fp, const char *message);
72 extern const char *_cupsLangString(cups_lang_t *lang,
73 const char *message);
74 extern void _cupsMessageFree(cups_array_t *a);
75 extern cups_array_t *_cupsMessageLoad(const char *filename, int flags);
76 extern const char *_cupsMessageLookup(cups_array_t *a, const char *m);
77 extern cups_array_t *_cupsMessageNew(void *context);
78 extern void _cupsSetLocale(char *argv[]);
79
80
81 # ifdef __cplusplus
82 }
83 # endif /* __cplusplus */
84
85 #endif /* !_CUPS_LANGUAGE_PRIVATE_H_ */