Class LocalizationClient
Inheritance
Inherited Members
Namespace: StansAssets.GoogleDoc
Assembly: cs.temp.dll.dll
Syntax
public class LocalizationClient
Constructors
LocalizationClient()
Declaration
public LocalizationClient()
LocalizationClient(String, String)
Declaration
public LocalizationClient(string defaultLangCode, string currentLangCode)
Parameters
Type | Name | Description |
---|---|---|
System.String | defaultLangCode | Set default language |
System.String | currentLangCode | Set current language |
Properties
CurrentLanguage
Current chosen language
Declaration
public string CurrentLanguage { get; }
Property Value
Type | Description |
---|---|
System.String |
DefaultLanguage
Default language for localization language If the language is not defined in the constructor, it returns the first language in the list.
Declaration
public string DefaultLanguage { get; }
Property Value
Type | Description |
---|---|
System.String |
Languages
Available Languages
Declaration
public List<string> Languages { get; }
Property Value
Type | Description |
---|---|
List<System.String> |
Sheets
Available Spreadsheet sheet names
Declaration
public List<string> Sheets { get; }
Property Value
Type | Description |
---|---|
List<System.String> |
Methods
GetLocalizedString(String)
Returns localized string by token
Declaration
public string GetLocalizedString(string token)
Parameters
Type | Name | Description |
---|---|---|
System.String | token | Localization token |
Returns
Type | Description |
---|---|
System.String |
GetLocalizedString(String, LocalizationClient.TextType)
Returns localized string by token
Declaration
public string GetLocalizedString(string token, LocalizationClient.TextType textType)
Parameters
Type | Name | Description |
---|---|---|
System.String | token | Localization token |
LocalizationClient.TextType | textType | returns localized string in the text type |
Returns
Type | Description |
---|---|
System.String |
GetLocalizedString(String, String)
Returns localized string by token
Declaration
public string GetLocalizedString(string token, string section)
Parameters
Type | Name | Description |
---|---|---|
System.String | token | Localization token |
System.String | section | Spreadsheet sheet name |
Returns
Type | Description |
---|---|
System.String |
GetLocalizedString(String, String, LocalizationClient.TextType)
Returns localized string by token
Declaration
public string GetLocalizedString(string token, string section, LocalizationClient.TextType textType)
Parameters
Type | Name | Description |
---|---|---|
System.String | token | Localization token |
System.String | section | Spreadsheet sheet name |
LocalizationClient.TextType | textType | returns localized string in the text type |
Returns
Type | Description |
---|---|
System.String |
GetLocalizedString(String, String, Object[])
Returns localized string by token
Declaration
public string GetLocalizedString(string token, string section, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
System.String | token | Localization token |
System.String | section | Spreadsheet sheet name |
System.Object[] | args | Insert the args in a string |
Returns
Type | Description |
---|---|
System.String |
SetLanguage(String)
Set current chosen language
Declaration
public void SetLanguage(string langCode)
Parameters
Type | Name | Description |
---|---|---|
System.String | langCode |
Events
OnLanguageChanged
Action is fired, when localization language changed
Declaration
public event Action<string> OnLanguageChanged
Event Type
Type | Description |
---|---|
Action<System.String> |