mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
Menu translation support
When generating menus, lookup translations for menu entries in specified textdomain. Often used by linux distributions. Original-patch-by: Alexey Voinov <voins@altlinux.ru> Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
This commit is contained in:
committed by
Carlos R. Mafra
parent
e9d42e5121
commit
ca1c29cd98
14
src/main.c
14
src/main.c
@@ -711,11 +711,21 @@ static int real_main(int argc, char **argv)
|
||||
if (!Locale || strcmp(Locale, "C") == 0 || strcmp(Locale, "POSIX") == 0)
|
||||
Locale = NULL;
|
||||
#ifdef I18N
|
||||
if (getenv("NLSPATH"))
|
||||
if (getenv("NLSPATH")) {
|
||||
bindtextdomain("WindowMaker", getenv("NLSPATH"));
|
||||
else
|
||||
#if defined(MENU_TEXTDOMAIN)
|
||||
bindtextdomain(MENU_TEXTDOMAIN, getenv("NLSPATH"));
|
||||
#endif
|
||||
} else {
|
||||
bindtextdomain("WindowMaker", LOCALEDIR);
|
||||
#if defined(MENU_TEXTDOMAIN)
|
||||
bindtextdomain(MENU_TEXTDOMAIN, LOCALEDIR);
|
||||
#endif
|
||||
}
|
||||
bind_textdomain_codeset("WindowMaker", "UTF-8");
|
||||
#if defined(MENU_TEXTDOMAIN)
|
||||
bind_textdomain_codeset(MENU_TEXTDOMAIN, "UTF-8");
|
||||
#endif
|
||||
textdomain("WindowMaker");
|
||||
|
||||
if (!XSupportsLocale()) {
|
||||
|
||||
Reference in New Issue
Block a user