1using System.Threading.Tasks;
15 private string module;
75 set => this.stringId = value;
86 set => this.module = value;
97 set => this.seed = value;
109 if (Steps is
null || Steps.Length == 0)
112 string Result = Steps[0].seed ??
string.Empty;
118 if (!
string.IsNullOrEmpty(Step.module))
126 LanguageString String = await BaseModule.GetStringAsync(Step.stringId);
130 Result = String.
Value.Replace(
"%0%", Result);
132 if (!
string.IsNullOrEmpty(Step.seed))
133 Result = Result.Replace(
"%1%", Step.seed);
Contains information about a language.
async Task< Namespace > GetNamespaceAsync(string Name)
Gets the namespace object, given its name, if available.
Contains a localized string.
string Value
Localized value.
Contains information about a namespace in a language.
Represents a localization step, as defined in XEP-323: http://xmpp.org/extensions/xep-0323....
string Seed
Optional localization seed.
static async Task< string > TryGetLocalization(Language Language, Namespace BaseModule, params LocalizationStep[] Steps)
Tries to get the localization of a string, given a sequence of localization steps.
string Module
Optional language module, if different from the base module.
LocalizationStep(int StringId)
Represents a localization step, as defined in XEP-323: http://xmpp.org/extensions/xep-0323....
LocalizationStep(int StringId, string Module)
Represents a localization step, as defined in XEP-323: http://xmpp.org/extensions/xep-0323....
LocalizationStep()
Represents a localization step, as defined in XEP-323: http://xmpp.org/extensions/xep-0323....
LocalizationStep(int StringId, string Module, string Seed)
Represents a localization step, as defined in XEP-323: http://xmpp.org/extensions/xep-0323....
TypeNameSerialization
How the type name should be serialized.