Translate login and logout pages

This commit is contained in:
jvyden 2022-07-26 17:01:48 -04:00
parent 1e9f672d6c
commit 443b285253
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
9 changed files with 132 additions and 13 deletions

View file

@ -26,9 +26,19 @@ public static class LocalizationManager
// e.g. BaseLayout.resx as opposed to BaseLayout.lang-da-DK.resx.
if (language != DefaultLang) resourceBasename += $".lang-{language}";
ResourceManager resourceManager = new(resourceBasename, Assembly.GetExecutingAssembly());
string? localizedString = null;
try
{
ResourceManager resourceManager = new(resourceBasename,
Assembly.GetExecutingAssembly());
string? localizedString = resourceManager.GetString(key);
localizedString = resourceManager.GetString(key);
}
catch
{
// ignored
}
if (localizedString == null)
{
#if DEBUG