Interface ITextProvider

Namespace
SurvivorsMaker.Presentation
Assembly
SurvivorsMaker.Presentation.dll

Text by key and language, for UI strings (UiText keys) and content names and descriptions ("<key>.name" / "<key>.description", key from ContentTextTable). Return null for anything the provider does not translate: the UI then uses the authored text (the UI string table, the assets' DisplayName and Description, finally the id). Plug a localization system in with TextProvider; LocalizedTextAsset is a ready-made table.

public interface ITextProvider

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

Get(string, string)

The text for key in language, or null.

string Get(string key, string language)

Parameters

key string
language string

Returns

string