]> git.ipfire.org Git - thirdparty/cups.git/blame - cups/language-private.h
License change: Apache License, Version 2.0.
[thirdparty/cups.git] / cups / language-private.h
CommitLineData
ef416fc2 1/*
503b54c9 2 * Private localization support for CUPS.
ef416fc2 3 *
c245abfe 4 * Copyright 2007-2017 by Apple Inc.
503b54c9 5 * Copyright 1997-2006 by Easy Software Products.
ef416fc2 6 *
e3101897 7 * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
ef416fc2 8 */
9
71e16022
MS
10#ifndef _CUPS_LANGUAGE_PRIVATE_H_
11# define _CUPS_LANGUAGE_PRIVATE_H_
ef416fc2 12
13/*
14 * Include necessary headers...
15 */
16
d6ae789d 17# include <stdio.h>
71e16022 18# include <cups/transcode.h>
454708a4
MS
19# ifdef __APPLE__
20# include <CoreFoundation/CoreFoundation.h>
21# endif /* __APPLE__ */
ef416fc2 22
23# ifdef __cplusplus
24extern "C" {
25# endif /* __cplusplus */
26
27
28/*
29 * Macro for localized text...
30 */
31
32# define _(x) x
33
34
35/*
36 * Types...
37 */
38
39typedef struct _cups_message_s /**** Message catalog entry ****/
40{
41 char *id, /* Original string */
42 *str; /* Localized string */
43} _cups_message_t;
44
45
46/*
47 * Prototypes...
48 */
49
f8b3a85b 50# ifdef __APPLE__
454708a4
MS
51extern const char *_cupsAppleLanguage(const char *locale, char *language, size_t langsize);
52extern const char *_cupsAppleLocale(CFStringRef languageName, char *locale, size_t localesize);
f8b3a85b 53# endif /* __APPLE__ */
d6ae789d 54extern void _cupsCharmapFlush(void);
ef416fc2 55extern const char *_cupsEncodingName(cups_encoding_t encoding);
0837b7e8
MS
56extern void _cupsLangPrintError(const char *prefix,
57 const char *message);
58extern int _cupsLangPrintFilter(FILE *fp, const char *prefix,
59 const char *message, ...)
85dda01c 60 __attribute__ ((__format__ (__printf__, 3, 4)));
fa73b229 61extern int _cupsLangPrintf(FILE *fp, const char *message, ...)
85dda01c 62 __attribute__ ((__format__ (__printf__, 2, 3)));
fa73b229 63extern int _cupsLangPuts(FILE *fp, const char *message);
0837b7e8
MS
64extern const char *_cupsLangString(cups_lang_t *lang,
65 const char *message);
ef416fc2 66extern void _cupsMessageFree(cups_array_t *a);
8b116e60 67extern cups_array_t *_cupsMessageLoad(const char *filename, int unquote);
ef416fc2 68extern const char *_cupsMessageLookup(cups_array_t *a, const char *m);
a29fd7dd 69extern cups_array_t *_cupsMessageNew(void *context);
07725fee 70extern void _cupsSetLocale(char *argv[]);
ef416fc2 71
a603edef 72
ef416fc2 73# ifdef __cplusplus
74}
75# endif /* __cplusplus */
76
71e16022 77#endif /* !_CUPS_LANGUAGE_PRIVATE_H_ */