Class LanguageUtil
Utility class for language system
Fields
ADD_KEYS_FOR_ALL_LANGUAGE_CODE_SETTING_ID
Used for remote setting between engine and rigged game
Declaration
public const int ADD_KEYS_FOR_ALL_LANGUAGE_CODE_SETTING_ID = 914528783
Methods
AddKeysForAllLanguageCode(string, bool)
Add all required keys for all language inside the root folder
Declaration
public static void AddKeysForAllLanguageCode(string languageRoot, bool includeMovementProp = false)
GetLanguageFolderPath(string, string)
Get folder for given language
Declaration
public static string GetLanguageFolderPath(string languageRoot, string language)
Parameters
Type | Name | Description |
---|---|---|
string | languageRoot | Root of the language folder |
string | language | ISO of the target language |
Returns
Type | Description |
---|---|
string | Path for the target language file |
GetSystemLanguageISO()
Get current language ISO of the OS
Declaration
public static string GetSystemLanguageISO()
LoadAllPairsFromDiskAtPath(string, bool)
Load and iterate through all language data pairs from given file
Declaration
public static IEnumerable<KeyValuePair<string, string>> LoadAllPairsFromDiskAtPath(string path, bool keepEscapeCharacters = false)
Parameters
Type | Name | Description |
---|---|---|
string | path | Language file path |
bool | keepEscapeCharacters | True if the escape characters (like "\n") will be set to original data |
LoadAllPairsFromFolder(string, string, bool)
Load and iterate through all language data pairs from given folder
Declaration
public static IEnumerable<KeyValuePair<string, string>> LoadAllPairsFromFolder(string languageRoot, string language, bool keepEscapeCharacters = false)
Parameters
Type | Name | Description |
---|---|---|
string | languageRoot | Root folder of the language data |
string | language | ISO of the target language |
bool | keepEscapeCharacters | True if the escape characters (like "\n") will be set to original data |
SaveAllPairsToDisk(string, IEnumerable<KeyValuePair<string, string>>)
Save given language data pairs into file
Declaration
public static void SaveAllPairsToDisk(string filePath, IEnumerable<KeyValuePair<string, string>> pairs)