Skip to content

Commit

Permalink
fixed localization issue if locale is different from predefined
Browse files Browse the repository at this point in the history
  • Loading branch information
semack committed Aug 17, 2020
1 parent 0ed3227 commit 637987c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Terminal.Tetris/Localization/Localizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,13 @@ private string this[string name]
get
{
var val = string.Empty;
if (!_resources.ContainsKey(_culture.Name)) return val;
if (_resources[_culture.Name].ContainsKey(name))
val = _resources[_culture.Name][name];
if (!_resources.ContainsKey(_culture.Name))
val = _resources[DefaultCultureName][name];
else
{
if (_resources[_culture.Name].ContainsKey(name))
val = _resources[_culture.Name][name];
}
return val;
}
}
Expand Down

0 comments on commit 637987c

Please sign in to comment.