Table of Contents

Class JsonStringLocalizer

Namespace
XENBIT.ResQueServe.Localization
Assembly
RQS.Localization.dll

Provides localization functionality using JSON-based resources.

public class JsonStringLocalizer : IStringLocalizer
Inheritance
JsonStringLocalizer
Implements
Inherited Members

Constructors

JsonStringLocalizer(IOptions<JsonStringLocalizerOptions>, ILogger<JsonStringLocalizer>)

Provides localization functionality using JSON-based resources.

public JsonStringLocalizer(IOptions<JsonStringLocalizerOptions> options, ILogger<JsonStringLocalizer> logger)

Parameters

options IOptions<JsonStringLocalizerOptions>
logger ILogger<JsonStringLocalizer>

Properties

BaseName

public string? BaseName { get; init; }

Property Value

string

this[string]

Gets the string resource with the given name.

public LocalizedString this[string name] { get; }

Parameters

name string

The name of the string resource.

Property Value

LocalizedString

The string resource as a LocalizedString.

this[string, object[]]

Gets the string resource with the given name and formatted with the supplied arguments.

public LocalizedString this[string name, params object[] arguments] { get; }

Parameters

name string

The name of the string resource.

arguments object[]

The values to format the string with.

Property Value

LocalizedString

The formatted string resource as a LocalizedString.

Methods

GetAllStrings(bool)

Gets all string resources.

public IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures)

Parameters

includeParentCultures bool

A bool indicating whether to include strings from parent cultures.

Returns

IEnumerable<LocalizedString>

The strings.