Class TextProviderLanguages
- Namespace
- SurvivorsMaker.Presentation
- Assembly
- SurvivorsMaker.Presentation.dll
Offers an ITextProvider's languages on the settings screen and installs its lookup.
public sealed class TextProviderLanguages : IUiLanguageProvider
- Inheritance
-
TextProviderLanguages
- Implements
- Inherited Members
Constructors
TextProviderLanguages(ITextProvider)
public TextProviderLanguages(ITextProvider provider)
Parameters
providerITextProvider
Properties
DefaultLanguage
Used when the saved choice is empty or no longer offered.
public string DefaultLanguage { get; }
Property Value
Languages
Language codes in display order. Never empty.
public IReadOnlyList<string> Languages { get; }
Property Value
Provider
public ITextProvider Provider { get; }
Property Value
Methods
DisplayName(string, UiStrings)
The provider's "settings.language.value.<code>" in that language, else the string table's name, else the code.
public string DisplayName(string code, UiStrings strings)
Parameters
Returns
Resolver(string)
Always a resolver, so switching back to the authored language also removes the previous translation.
public Func<string, string> Resolver(string code)
Parameters
codestring