summaryrefslogtreecommitdiff
path: root/src/basic/locale-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-26 23:01:30 +0100
committerLennart Poettering <lennart@poettering.net>2015-10-27 13:25:56 +0100
commit8752c5752f3b9023f9ce96a55d70c6e5fc31118f (patch)
tree9a14d641981c51f82962d9c9652d63b1293bb753 /src/basic/locale-util.h
parentb8faf2ecd551d853c449c7cadc3944af84156bc9 (diff)
util-lib: move more locale-related calls to locale-util.[ch]
Diffstat (limited to 'src/basic/locale-util.h')
-rw-r--r--src/basic/locale-util.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/basic/locale-util.h b/src/basic/locale-util.h
index e48aa3d9af..c71d145139 100644
--- a/src/basic/locale-util.h
+++ b/src/basic/locale-util.h
@@ -21,6 +21,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <libintl.h>
#include <stdbool.h>
#include "macro.h"
@@ -50,5 +51,25 @@ typedef enum LocaleVariable {
int get_locales(char ***l);
bool locale_is_valid(const char *name);
+#define _(String) gettext(String)
+#define N_(String) String
+void init_gettext(void);
+
+bool is_locale_utf8(void);
+
+typedef enum DrawSpecialChar {
+ DRAW_TREE_VERTICAL,
+ DRAW_TREE_BRANCH,
+ DRAW_TREE_RIGHT,
+ DRAW_TREE_SPACE,
+ DRAW_TRIANGULAR_BULLET,
+ DRAW_BLACK_CIRCLE,
+ DRAW_ARROW,
+ DRAW_DASH,
+ _DRAW_SPECIAL_CHAR_MAX
+} DrawSpecialChar;
+
+const char *draw_special_char(DrawSpecialChar ch);
+
const char* locale_variable_to_string(LocaleVariable i) _const_;
LocaleVariable locale_variable_from_string(const char *s) _pure_;