This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

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

translations TranslationOptions
localization LocalizationOptions
httpContextAccessor IHttpContextAccessor

Methods

Create

#
public IStringLocalizer Create(Type resourceSource)

Returns the shared localizer; resourceSource is ignored.

Parameters

resourceSource Type

Returns

IStringLocalizer

Create

#
public IStringLocalizer Create(string baseName, string location)

Returns the shared localizer; baseName and location are ignored.

Parameters

baseName string
location string

Returns

IStringLocalizer

Pennington.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)
; }