/*
7 * Patrick Storz <eduard.braun2@gmx.de>
9 * Copyright (C) 2018 Authors
10 * Released under GNU GPL v2+, read the file
'COPYING' for more information.
25#include <glibmm/i18n.h>
31 auto localepath = Glib::getenv(
"INKSCAPE_LOCALEDIR");
33 if (localepath.empty()) {
34 localepath = Glib::build_filename(Glib::path_get_dirname(
get_inkscape_datadir()), PACKAGE_LOCALE_DIR);
37 if (!Glib::file_test(localepath, Glib::FileTest::IS_DIR)) {
38 localepath = PACKAGE_LOCALE_DIR_ABSOLUTE;
43 auto shortlocalepath = g_win32_locale_filename_from_utf8(localepath.c_str());
44 localepath = shortlocalepath;
45 g_free(shortlocalepath);
48 bindtextdomain(GETTEXT_PACKAGE, localepath.c_str());
51 bind_textdomain_codeset(GETTEXT_PACKAGE,
"UTF-8");
52 textdomain(GETTEXT_PACKAGE);
57 bind_textdomain_codeset(GETTEXT_PACKAGE,
"UTF-8");
69 bind_textdomain_codeset(GETTEXT_PACKAGE,
"UTF-8");
72 Glib::get_charset(charset);
73 bind_textdomain_codeset(GETTEXT_PACKAGE, charset.c_str());
Helper class to stream background task notifications as a series of messages.
void bind_textdomain_codeset_utf8()
set gettext codeset to UTF8
void bind_textdomain_codeset_console()
set gettext codeset to codeset of the system console
void initialize_gettext()
does all required gettext initialization and takes care of the respective locale directory paths
char const * get_inkscape_datadir()
Determine the location of the Inkscape data directory (typically the share/ folder from where Inkscap...
TODO: insert short description here.