// Import the following namespace
using PowerPortalsPro.Web.Common.Services;
[Inject]
private IStringLocalizer _localizer { get; set; } = null!;
[Inject]
private IStringLocalizer<StringLocalizerMainDemo> _componentLocalizer { get; set; } = null!;
private IStringLocalizer _prefixedLocalizer;
protected override void OnInitialized()
{
_prefixedLocalizer = _localizer.GetPrefixedLocalizer("app.pages");
}
App Localization Keys
Below are the current keys and their values for all the 'app' localizations:
IStringLocalizer Class
Methods
Name | Parameters | Type | Description |
---|---|---|---|
FindLocalizedString | string[] keys | LocalizedString | Returns the first valid match based on the provided keys. |
GetPrefixedLocalizer | string prefix | IPrefixedStringLocalizer |