1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 This file is part of systemd.
7 Copyright 2014 Lennart Poettering
16 typedef enum LocaleVariable
{
17 /* We don't list LC_ALL here on purpose. People should be
18 * using LANG instead. */
31 VARIABLE_LC_TELEPHONE
,
32 VARIABLE_LC_MEASUREMENT
,
33 VARIABLE_LC_IDENTIFICATION
,
35 _VARIABLE_LC_INVALID
= -1
38 int get_locales(char ***l
);
39 bool locale_is_valid(const char *name
);
41 #define _(String) gettext(String)
42 #define N_(String) String
43 void init_gettext(void);
45 bool is_locale_utf8(void);
59 const char *special_glyph(SpecialGlyph code
) _const_
;
61 const char* locale_variable_to_string(LocaleVariable i
) _const_
;
62 LocaleVariable
locale_variable_from_string(const char *s
) _pure_
;
64 int get_keymaps(char ***l
);
65 bool keymap_is_valid(const char *name
);
67 static inline void freelocalep(locale_t
*p
) {
68 if (*p
== (locale_t
) 0)