C# Class NaturalResourcesBrush.TranslationFramework.Translation

Handles localisation for a mod.
Afficher le fichier Open project: earalov/Skylines-NaturalResourcesBrush

Protected Properties

Свойство Type Description
_currentLanguage Language
_languages List
_languagesLoaded bool
_loadLanguageAutomatically bool

Méthodes publiques

Méthode Description
AvailableLanguages ( ) : List

Returns a list of languages which are available to the mod. This will return language IDs for searching.

AvailableLanguagesReadable ( ) : List

Returns a list of languages which are available to the mod. This will return readable languages for use on the UI

GetLanguageIDsFromName ( string name ) : List

Returns a list of Language unique IDs that have the name

GetTranslation ( string translationId ) : string

Gets a translation for a specific translation ID

HasTranslation ( string translationId ) : bool

Returns whether you can translate into a specific translation ID

LoadLanguages ( ) : void

Loads all languages up if not already loaded.

RefreshLanguages ( ) : void

Forces a reload of the languages, even if they're already loaded

Translation ( bool loadLanguageAutomatically = true ) : System.Collections.Generic

Méthodes protégées

Méthode Description
DeserialiseLanguage ( TextReader reader ) : Language

Deserialise a language file using a TextReader

Private Methods

Méthode Description
SetCurrentLanguage ( ) : void

Method Details

AvailableLanguages() public méthode

Returns a list of languages which are available to the mod. This will return language IDs for searching.
public AvailableLanguages ( ) : List
Résultat List

AvailableLanguagesReadable() public méthode

Returns a list of languages which are available to the mod. This will return readable languages for use on the UI
public AvailableLanguagesReadable ( ) : List
Résultat List

DeserialiseLanguage() protected méthode

Deserialise a language file using a TextReader
protected DeserialiseLanguage ( TextReader reader ) : Language
reader System.IO.TextReader The text to deserialise
Résultat Language

GetLanguageIDsFromName() public méthode

Returns a list of Language unique IDs that have the name
public GetLanguageIDsFromName ( string name ) : List
name string The name of the language to get IDs for
Résultat List

GetTranslation() public méthode

Gets a translation for a specific translation ID
public GetTranslation ( string translationId ) : string
translationId string The ID to return the translation for
Résultat string

HasTranslation() public méthode

Returns whether you can translate into a specific translation ID
public HasTranslation ( string translationId ) : bool
translationId string The ID of the translation to check
Résultat bool

LoadLanguages() public méthode

Loads all languages up if not already loaded.
public LoadLanguages ( ) : void
Résultat void

RefreshLanguages() public méthode

Forces a reload of the languages, even if they're already loaded
public RefreshLanguages ( ) : void
Résultat void

Translation() public méthode

public Translation ( bool loadLanguageAutomatically = true ) : System.Collections.Generic
loadLanguageAutomatically bool
Résultat System.Collections.Generic

Property Details

_currentLanguage protected_oe property

protected Language,NaturalResourcesBrush.TranslationFramework _currentLanguage
Résultat Language

_languages protected_oe property

protected List _languages
Résultat List

_languagesLoaded protected_oe property

protected bool _languagesLoaded
Résultat bool

_loadLanguageAutomatically protected_oe property

protected bool _loadLanguageAutomatically
Résultat bool