Class LocalizationSettings
เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน
Namespace: Cephalon.Engine.Configuration
Assembly: Cephalon.Engine.dll
Describes localization configuration for the runtime and module resources.
public sealed class LocalizationSettingsInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Section titled “Constructors”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
public LocalizationSettings(string? defaultCulture = null, IReadOnlyList<string>? supportedCultures = null, IReadOnlyDictionary<string, IReadOnlyDictionary<string, string>>? resources = null)Parameters
Section titled “Parameters”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.
Properties
Section titled “Properties”DefaultCulture
Section titled “ DefaultCulture”Gets the default culture to use when no explicit culture is requested.
public string? DefaultCulture { get; }Property Value
Section titled “Property Value”Gets an empty localization configuration instance.
public static LocalizationSettings Empty { get; }Property Value
Section titled “Property Value”HasValues
Section titled “ HasValues”Gets a value indicating whether any localization settings were explicitly supplied.
public bool HasValues { get; }Property Value
Section titled “Property Value”Resources
Section titled “ Resources”Gets localized resource entries keyed by culture and resource key.
public IReadOnlyDictionary<string, IReadOnlyDictionary<string, string>> Resources { get; }Property Value
Section titled “Property Value”IReadOnlyDictionary<string, IReadOnlyDictionary<string, string>>
SupportedCultures
Section titled “ SupportedCultures”Gets the supported culture identifiers.
public IReadOnlyList<string> SupportedCultures { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”FromConfiguration(IConfiguration, string)
Section titled “ FromConfiguration(IConfiguration, string)”Reads localization settings from configuration.
public static LocalizationSettings FromConfiguration(IConfiguration configuration, string sectionPath = "Engine")Parameters
Section titled “Parameters”configuration IConfiguration
The configuration source that contains the engine section.
sectionPath string
The root configuration section path to read from.
Returns
Section titled “Returns”The parsed localization settings.
Merge(LocalizationSettings?)
Section titled “ Merge(LocalizationSettings?)”Merges another localization settings instance into the current instance.
public LocalizationSettings Merge(LocalizationSettings? other)Parameters
Section titled “Parameters”other LocalizationSettings?
The localization settings to overlay on top of the current values.
Returns
Section titled “Returns”A merged localization settings instance.