Using ToLowerInvariant instead of ToLower (the game works for Turkish players now!)

http://www.moserware.com/2008/02/does-your-code-pass-turkey-test.html
This commit is contained in:
Regalis
2016-04-27 17:14:09 +03:00
parent 81ca1a409b
commit d3ab7946a8
52 changed files with 96 additions and 94 deletions

View File

@@ -25,7 +25,7 @@ namespace Barotrauma
foreach (XElement subElement in doc.Root.Elements())
{
string infoName = subElement.Name.ToString().ToLower();
string infoName = subElement.Name.ToString().ToLowerInvariant();
List<string> infoList = null;
if (!infoTexts.TryGetValue(infoName, out infoList))
{
@@ -40,7 +40,7 @@ namespace Barotrauma
public static string GetInfoText(string infoName)
{
List<string> infoList = null;
if (!infoTexts.TryGetValue(infoName.ToLower(), out infoList) || !infoList.Any())
if (!infoTexts.TryGetValue(infoName.ToLowerInvariant(), out infoList) || !infoList.Any())
{
#if DEBUG
return "Info text ''" + infoName + "'' not found";