Translation

public static class Translation
Static class which provides some cached translation methods for English -> Other.

Properties

SupportedLanguages

#
Iterate over all supported languages, including English.
public static IEnumerable<Language> SupportedLanguages { get; }

Methods

Hash

#
Hash a string to a 128 bit hash.
public static Guid Hash(
text
)

LanguageCode

#
public static string LanguageCode(
Language
language
)

LanguageEnglishName

#
public static string LanguageEnglishName(
Language
language
)

LanguageNativeName

#
public static string LanguageNativeName(
Language
language
)

Translate

#
Low level translation function accepting a target language code. This method will return synchronously if the translation has already been cached.
public static Task<string> Translate(
english,
Language
targetLanguage
)

TranslateAndAssign

#
Translate and assign a string. Typically you'd use this method from the UI thread and throw away the tasks it returns.
public static Task<bool> TranslateAndAssign(
english,
English string.
Language
targetLanguage,
Target language.
assignment
Assigment delegate. This delegate will be invoked on the UI thread, but only if the settings UI language still equals the targetLanguage.
)
True if assignment was made, but this method was designed to be fire-and-forget.