Class WeaverLanguage
Used for accessing translations
Namespace: WeaverCore
Assembly: WeaverCore.dll
Syntax
public static class WeaverLanguage
Methods
| Edit this page View SourceGetString(string, string)
Gets a translated string via a key
Declaration
public static string GetString(string key, string fallback = null)
Parameters
Type | Name | Description |
---|---|---|
string | key | The language key to get the translated string under |
string | fallback | A fallback in case the key wasn't found |
Returns
Type | Description |
---|---|
string | Returns the translated string from the language key |
GetString(string, string, string)
Gets a translated string via a key and sheetTitle
Declaration
public static string GetString(string key, string sheetTitle, string fallback = null)
Parameters
Type | Name | Description |
---|---|---|
string | key | The language key to get the translated string under |
string | sheetTitle | The sheet title to get teh translated string under |
string | fallback | A fallback in case the key wasn't found |
Returns
Type | Description |
---|---|
string | Returns the translated string from the language key |
GetStringInternal(string)
Declaration
public static string GetStringInternal(string key)
Parameters
Type | Name | Description |
---|---|---|
string | key |
Returns
Type | Description |
---|---|
string |
GetStringInternal(string, string)
Declaration
public static string GetStringInternal(string key, string sheetTitle)
Parameters
Type | Name | Description |
---|---|---|
string | key | |
string | sheetTitle |
Returns
Type | Description |
---|---|
string |
HasString(string)
Does the language key exist?
Declaration
public static bool HasString(string key)
Parameters
Type | Name | Description |
---|---|---|
string | key | The language key to check for |
Returns
Type | Description |
---|---|
bool | Returns true if the language key exists |
HasString(string, string)
Does the language key exist?
Declaration
public static bool HasString(string key, string sheetTitle)
Parameters
Type | Name | Description |
---|---|---|
string | key | The language key to check for |
string | sheetTitle | The sheet title to get teh translated string under |
Returns
Type | Description |
---|---|
bool | Returns true if the language key exists |