C# 클래스 NaturalResourcesBrush.TranslationFramework.Translation

Handles localisation for a mod.
파일 보기 프로젝트 열기: earalov/Skylines-NaturalResourcesBrush

보호된 프로퍼티들

프로퍼티 타입 설명
_currentLanguage Language
_languages List
_languagesLoaded bool
_loadLanguageAutomatically bool

공개 메소드들

메소드 설명
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

보호된 메소드들

메소드 설명
DeserialiseLanguage ( TextReader reader ) : Language

Deserialise a language file using a TextReader

비공개 메소드들

메소드 설명
SetCurrentLanguage ( ) : void

메소드 상세

AvailableLanguages() 공개 메소드

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

AvailableLanguagesReadable() 공개 메소드

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

DeserialiseLanguage() 보호된 메소드

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

GetLanguageIDsFromName() 공개 메소드

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
리턴 List

GetTranslation() 공개 메소드

Gets a translation for a specific translation ID
public GetTranslation ( string translationId ) : string
translationId string The ID to return the translation for
리턴 string

HasTranslation() 공개 메소드

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

LoadLanguages() 공개 메소드

Loads all languages up if not already loaded.
public LoadLanguages ( ) : void
리턴 void

RefreshLanguages() 공개 메소드

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

Translation() 공개 메소드

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

프로퍼티 상세

_currentLanguage 보호되어 있는 프로퍼티

protected Language,NaturalResourcesBrush.TranslationFramework _currentLanguage
리턴 Language

_languages 보호되어 있는 프로퍼티

protected List _languages
리턴 List

_languagesLoaded 보호되어 있는 프로퍼티

protected bool _languagesLoaded
리턴 bool

_loadLanguageAutomatically 보호되어 있는 프로퍼티

protected bool _loadLanguageAutomatically
리턴 bool