Interface IUiLanguageProvider

Namespace
SurvivorsMaker.Presentation
Assembly
SurvivorsMaker.Presentation.dll

Supplies the languages the settings screen offers and the text lookup for each. Plug a localization system in through Languages; the resolver is installed as Resolve and keys it does not know fall back to the string table.

public interface IUiLanguageProvider

Properties

DefaultLanguage

Used when the saved choice is empty or no longer offered.

string DefaultLanguage { get; }

Property Value

string

Languages

Language codes in display order. Never empty.

IReadOnlyList<string> Languages { get; }

Property Value

IReadOnlyList<string>

Methods

DisplayName(string, UiStrings)

Returns the language label for a code using the supplied text resolver.

string DisplayName(string code, UiStrings strings)

Parameters

code string
strings UiStrings

Returns

string

Resolver(string)

Text lookup for code (null result = not translated). Null keeps the string table as it is.

Func<string, string> Resolver(string code)

Parameters

code string

Returns

Func<string, string>