1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 Copyright 2014 Lennart Poettering
14 typedef enum LocaleVariable {
15 /* We don't list LC_ALL here on purpose. People should be
16 * using LANG instead. */
29 VARIABLE_LC_TELEPHONE,
30 VARIABLE_LC_MEASUREMENT,
31 VARIABLE_LC_IDENTIFICATION,
33 _VARIABLE_LC_INVALID = -1
36 int get_locales(char ***l);
37 bool locale_is_valid(const char *name);
39 #define _(String) gettext(String)
40 #define N_(String) String
41 void init_gettext(void);
43 bool is_locale_utf8(void);
58 const char *special_glyph(SpecialGlyph code) _const_;
60 const char* locale_variable_to_string(LocaleVariable i) _const_;
61 LocaleVariable locale_variable_from_string(const char *s) _pure_;
63 int get_keymaps(char ***l);
64 bool keymap_is_valid(const char *name);
66 static inline void freelocalep(locale_t *p) {
67 if (*p == (locale_t) 0)