ข้ามไปยังเนื้อหา

Class LocalizationSettings

เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน

Namespace: Cephalon.Engine.Configuration
Assembly: Cephalon.Engine.dll

Describes localization configuration for the runtime and module resources.

public sealed class LocalizationSettings

objectLocalizationSettings

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

LocalizationSettings(string?, IReadOnlyList<string>?, IReadOnlyDictionary<string, IReadOnlyDictionary<string, string>>?)

Section titled “ LocalizationSettings(string?, IReadOnlyList<string>?, IReadOnlyDictionary<string, IReadOnlyDictionary<string, string>>?)”

Initializes a new instance of the class.

public LocalizationSettings(string? defaultCulture = null, IReadOnlyList<string>? supportedCultures = null, IReadOnlyDictionary<string, IReadOnlyDictionary<string, string>>? resources = null)

defaultCulture string?

The default culture to use when no explicit culture is requested.

supportedCultures IReadOnlyList<string>?

The supported culture identifiers.

resources IReadOnlyDictionary<string, IReadOnlyDictionary<string, string>>?

Localized resource entries keyed by culture and resource key.

Gets the default culture to use when no explicit culture is requested.

public string? DefaultCulture { get; }

string?

Gets an empty localization configuration instance.

public static LocalizationSettings Empty { get; }

LocalizationSettings

Gets a value indicating whether any localization settings were explicitly supplied.

public bool HasValues { get; }

bool

Gets localized resource entries keyed by culture and resource key.

public IReadOnlyDictionary<string, IReadOnlyDictionary<string, string>> Resources { get; }

IReadOnlyDictionary<string, IReadOnlyDictionary<string, string>>

Gets the supported culture identifiers.

public IReadOnlyList<string> SupportedCultures { get; }

IReadOnlyList<string>

FromConfiguration(IConfiguration, string)

Section titled “ FromConfiguration(IConfiguration, string)”

Reads localization settings from configuration.

public static LocalizationSettings FromConfiguration(IConfiguration configuration, string sectionPath = "Engine")

configuration IConfiguration

The configuration source that contains the engine section.

sectionPath string

The root configuration section path to read from.

LocalizationSettings

The parsed localization settings.

Merges another localization settings instance into the current instance.

public LocalizationSettings Merge(LocalizationSettings? other)

other LocalizationSettings?

The localization settings to overlay on top of the current values.

LocalizationSettings

A merged localization settings instance.