[svn] GpgEX - r41 - trunk/src
svn author marcus
cvs at cvs.gnupg.org
Mon Nov 12 14:04:01 CET 2007
Author: marcus
Date: 2007-11-12 14:03:52 +0100 (Mon, 12 Nov 2007)
New Revision: 41
Modified:
trunk/src/ChangeLog
trunk/src/gpgex.cc
Log:
2007-11-12 Marcus Brinkmann <marcus at g10code.de>
* gpgex.cc (get_lang_name): Get preferred language.
(start_help): Invoke language specific help.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2007-11-12 12:20:35 UTC (rev 40)
+++ trunk/src/ChangeLog 2007-11-12 13:03:52 UTC (rev 41)
@@ -1,3 +1,8 @@
+2007-11-12 Marcus Brinkmann <marcus at g10code.de>
+
+ * gpgex.cc (get_lang_name): Get preferred language.
+ (start_help): Invoke language specific help.
+
2007-11-08 Marcus Brinkmann <marcus at g10code.de>
* gpgex.cc: Include registry.h.
Modified: trunk/src/gpgex.cc
===================================================================
--- trunk/src/gpgex.cc 2007-11-12 12:20:35 UTC (rev 40)
+++ trunk/src/gpgex.cc 2007-11-12 13:03:52 UTC (rev 41)
@@ -460,6 +460,23 @@
}
+static char *
+get_lang_name (void)
+{
+ LANGID lang;
+
+ lang = GetUserDefaultUILanguage (void);
+ switch (PRIMARYLANGID (lang))
+ {
+ case LANG_GERMAN:
+ return "de";
+
+ case LANG_ENGLISH:
+ default:
+ return "en";
+ }
+}
+
/* FIXME: Might be exported in a helper utility. Also, it might be
that we use KDE's help browser? */
static void
@@ -501,10 +518,9 @@
if (!dir)
_snwprintf (url, URLSIZE, L"%S", "http://www.gpg4win.org/");
else
- /* FIXME: Select on language. */
_snwprintf (url,
- URLSIZE, L"file:///%S\\share\\doc\\gpgex\\gpgex-en.html",
- dir);
+ URLSIZE, L"file:///%S\\share\\doc\\gpgex\\gpgex-%S.html",
+ dir, get_lang_name ());
url[URLSIZE - 1] = '\0';
}
More information about the Gnupg-commits
mailing list