[longomatch] Fix language change in Windows
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix language change in Windows
- Date: Wed, 18 Sep 2013 19:14:12 +0000 (UTC)
commit 051b069be2eaa1346cebc99dff3ee16dececfe85
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Thu Aug 15 21:44:38 2013 +0200
Fix language change in Windows
LongoMatch.Services/Services/Core.cs | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.Services/Services/Core.cs b/LongoMatch.Services/Services/Core.cs
index 6925b06..de7c0a9 100644
--- a/LongoMatch.Services/Services/Core.cs
+++ b/LongoMatch.Services/Services/Core.cs
@@ -18,6 +18,9 @@
using System;
using System.IO;
using Mono.Unix;
+#if OSTYPE_WINDOWS
+using System.Runtime.InteropServices;
+#endif
using LongoMatch;
using LongoMatch.DB;
@@ -41,6 +44,10 @@ namespace LongoMatch.Services
static RenderingJobsManager videoRenderer;
static IMainWindow mainWindow;
static IGUIToolkit guiToolkit;
+#if OSTYPE_WINDOWS
+ [DllImport("libglib-2.0-0.dll") /* willfully unmapped */ ]
+ static extern void g_setenv (String env, String val);
+#endif
public static void Init()
{
@@ -57,7 +64,9 @@ namespace LongoMatch.Services
if (Config.Lang != null) {
Environment.SetEnvironmentVariable ("LANGUAGE", Config.Lang);
- Environment.SetEnvironmentVariable ("LANG", Config.Lang);
+#if OSTYPE_WINDOWS
+ g_setenv ("LANGUAGE", Config.Lang);
+#endif
}
/* Init internationalization support */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]