Skip to content

Commit

Permalink
Implemented #193; setting CurrentThread culture from Project.Language…
Browse files Browse the repository at this point in the history
… at compile time.
  • Loading branch information
oleg-shilo committed Nov 12, 2017
1 parent e13b503 commit 5cf8e70
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Source/src/WixSharp/WixProject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
using System.Linq;
using System.Xml.Linq;
using System.Collections.Generic;
using System.Threading;
using System.Globalization;

namespace WixSharp
{
Expand Down Expand Up @@ -114,7 +116,16 @@ public List<string> WixExtensions
public string Language
{
get { return language; }
set { language = value.DeflateWhitespaces(); }
set
{
language = value.DeflateWhitespaces();
try
{
if (language.IsNotEmpty())
Thread.CurrentThread.CurrentUICulture = new CultureInfo(language);
}
catch { }
}
}

/// <summary>
Expand Down

0 comments on commit 5cf8e70

Please sign in to comment.