Skip to content

Commit 6ad85fe

Browse files
committed
Return the localization key if the translation value is not found
1 parent 559c5b6 commit 6ad85fe

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

VisualStudioDiscordRPC.Shared/Services/LocalizationService.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ public void SelectLanguage(string language)
6666

6767
public string Localize(string key)
6868
{
69-
return Current.LocalizedValues[key];
69+
if (Current.LocalizedValues.TryGetValue(key, out var value))
70+
{
71+
return value;
72+
}
73+
74+
return $"#{key}";
7075
}
7176
}
7277
}

0 commit comments

Comments
 (0)