PenningtonStringLocalizerFactory
Pennington.Localization
An IStringLocalizerFactory that returns PenningtonStringLocalizer instances backed by TranslationOptions. All localizer instances share the same translation dictionary — the type/location parameters are ignored.
Constructors
PenningtonStringLocalizerFactory
#public PenningtonStringLocalizerFactory(TranslationOptions translations, LocalizationOptions localization, IHttpContextAccessor httpContextAccessor)
Creates the factory with the shared localizer instance.
Parameters
translationsTranslationOptionslocalizationLocalizationOptionshttpContextAccessorIHttpContextAccessor
Methods
Create
#public IStringLocalizer Create(Type resourceSource)
Returns the shared localizer; resourceSource is ignored.
Parameters
resourceSourceType
Returns
IStringLocalizerCreate
#public IStringLocalizer Create(string baseName, string location)
Returns the shared localizer; baseName and location are ignored.
Parameters
baseNamestringlocationstring
Returns
IStringLocalizerPennington.Localization.PenningtonStringLocalizerFactory
namespace Pennington.Localization;
/// An IStringLocalizerFactory that returns PenningtonStringLocalizer instances backed by TranslationOptions. All localizer instances share the same translation dictionary — the type/location parameters are ignored.
public class PenningtonStringLocalizerFactory
{
/// Returns the shared localizer; resourceSource is ignored.
public IStringLocalizer Create(Type resourceSource)
;
/// Returns the shared localizer; baseName and location are ignored.
public IStringLocalizer Create(string baseName, string location)
;
/// Creates the factory with the shared localizer instance.
public PenningtonStringLocalizerFactory(TranslationOptions translations, LocalizationOptions localization, IHttpContextAccessor httpContextAccessor)
;
}