[longomatch] Overwrite LANGUAGE envvar if it already exists on Windows, and fix some language names.



commit 95da23e131ab011183d301e0892efce8739aa007
Author: Xavi Artigas <xartigas fluendo com>
Date:   Tue Dec 16 11:04:12 2014 +0100

    Overwrite LANGUAGE envvar if it already exists on Windows, and fix some language names.

 LongoMatch.Services/Services/CoreServices.cs |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/LongoMatch.Services/Services/CoreServices.cs b/LongoMatch.Services/Services/CoreServices.cs
index 85951cc..3e12bd3 100644
--- a/LongoMatch.Services/Services/CoreServices.cs
+++ b/LongoMatch.Services/Services/CoreServices.cs
@@ -46,8 +46,7 @@ namespace LongoMatch.Services
                public static IProjectsImporter ProjectsImporter;
                #if OSTYPE_WINDOWS
                [DllImport("libglib-2.0-0.dll") /* willfully unmapped */ ]
-               static extern void g_setenv (String env, String val);
-               
+               static extern bool g_setenv (String env, String val, bool overwrite);
                #endif
                public static void Init ()
                {
@@ -65,7 +64,7 @@ namespace LongoMatch.Services
                        if (Config.Lang != null) {
                                Environment.SetEnvironmentVariable ("LANGUAGE", Config.Lang);
 #if OSTYPE_WINDOWS
-                               g_setenv ("LANGUAGE", Config.Lang);
+                               g_setenv ("LANGUAGE", Config.Lang.Replace ("-", "_"), true);
 #endif
                        }
                        


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]