C# Class Polyglot.Localization

Inheritance: UnityEngine.ScriptableObject
Show file Open project: Skjalgsm/PolyglotUnity

Private Properties

Property Type Description
GetLanguageDirection LanguageDirection
IsLanguageSupported bool

Public Methods

Method Description
AddOnLocalizeEvent ( ILocalize localize ) : void

Add a Localization listener to catch the event that is invoked when the selected language is changed.

Get ( string key ) : string

Retreives the correct language string by key.

GetFormat ( string key ) : string

InvokeOnLocalize ( ) : void
KeyExist ( string key ) : bool
RemoveOnLocalizeEvent ( ILocalize localize ) : void

Removes a Localization listener.

SelectLanguage ( int selected ) : void

Select a language, used by dropdowns and the like.

Private Methods

Method Description
GetLanguageDirection ( Language language ) : LanguageDirection
IsLanguageSupported ( Language language ) : bool

Method Details

AddOnLocalizeEvent() public method

Add a Localization listener to catch the event that is invoked when the selected language is changed.
public AddOnLocalizeEvent ( ILocalize localize ) : void
localize ILocalize
return void

Get() public static method

Retreives the correct language string by key.
public static Get ( string key ) : string
key string The key string
return string

GetFormat() public static method

public static GetFormat ( string key ) : string
key string
return string

InvokeOnLocalize() public method

public InvokeOnLocalize ( ) : void
return void

KeyExist() public static method

public static KeyExist ( string key ) : bool
key string
return bool

RemoveOnLocalizeEvent() public method

Removes a Localization listener.
public RemoveOnLocalizeEvent ( ILocalize localize ) : void
localize ILocalize
return void

SelectLanguage() public method

Select a language, used by dropdowns and the like.
public SelectLanguage ( int selected ) : void
selected int
return void