]>
git.ipfire.org Git - thirdparty/cups.git/blob - cups/language-private.h
2 * Private localization support for CUPS.
4 * Copyright 2007-2017 by Apple Inc.
5 * Copyright 1997-2006 by Easy Software Products.
7 * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
10 #ifndef _CUPS_LANGUAGE_PRIVATE_H_
11 # define _CUPS_LANGUAGE_PRIVATE_H_
14 * Include necessary headers...
18 # include <cups/transcode.h>
20 # include <CoreFoundation/CoreFoundation.h>
21 # endif /* __APPLE__ */
25 # endif /* __cplusplus */
29 * Macro for localized text...
39 # define _CUPS_MESSAGE_PO 0 /* Message file is in GNU .po format */
40 # define _CUPS_MESSAGE_UNQUOTE 1 /* Unescape \foo in strings? */
41 # define _CUPS_MESSAGE_STRINGS 2 /* Message file is in Apple .strings format */
48 typedef struct _cups_message_s
/**** Message catalog entry ****/
50 char *msg
, /* Original string */
51 *str
; /* Localized string */
60 extern const char *_cupsAppleLanguage(const char *locale
, char *language
, size_t langsize
);
61 extern const char *_cupsAppleLocale(CFStringRef languageName
, char *locale
, size_t localesize
);
62 # endif /* __APPLE__ */
63 extern void _cupsCharmapFlush(void);
64 extern const char *_cupsEncodingName(cups_encoding_t encoding
);
65 extern void _cupsLangPrintError(const char *prefix
,
67 extern int _cupsLangPrintFilter(FILE *fp
, const char *prefix
,
68 const char *message
, ...)
69 __attribute__ ((__format__ (__printf__
, 3, 4)));
70 extern int _cupsLangPrintf(FILE *fp
, const char *message
, ...)
71 __attribute__ ((__format__ (__printf__
, 2, 3)));
72 extern int _cupsLangPuts(FILE *fp
, const char *message
);
73 extern const char *_cupsLangString(cups_lang_t
*lang
,
75 extern void _cupsMessageFree(cups_array_t
*a
);
76 extern cups_array_t
*_cupsMessageLoad(const char *filename
, int flags
);
77 extern const char *_cupsMessageLookup(cups_array_t
*a
, const char *m
);
78 extern cups_array_t
*_cupsMessageNew(void *context
);
79 extern int _cupsMessageSave(const char *filename
, int flags
, cups_array_t
*a
);
80 extern void _cupsSetLocale(char *argv
[]);
85 # endif /* __cplusplus */
87 #endif /* !_CUPS_LANGUAGE_PRIVATE_H_ */