Fallback to English as default culture
This commit is contained in:
@ -24,10 +24,25 @@ namespace Oqtane.Modules.Controls
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
return _localizer?[key] ?? name;
|
||||
}
|
||||
|
||||
protected string Localize(string name, string defaultValue)
|
||||
{
|
||||
var key = $"{ResourceKey}.{name}";
|
||||
var value = Localize(name);
|
||||
|
||||
if (value == key)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
if (!String.IsNullOrEmpty(ResourceKey))
|
||||
|
Reference in New Issue
Block a user