|
G1R AngelScript
Scripting reference for the Gothic 1 Remake
|
Functions | |
Utilities|Internationalization | |
| FString | GetNativeCulture (ELocalizedTextSourceCategory TextCategory) |
| Get the native culture for the given localization category. | |
| FString | GetCultureDisplayName (FString Culture, bool Localized=true) |
| Get the display name of the given culture. | |
| FString | GetCurrentAssetGroupCulture (const FName AssetGroup) |
| Get the given asset group category culture. Note: Returns the current language if the group category doesn't have a culture override. | |
| FString | GetCurrentCulture () |
| Get the current culture as an IETF language tag: | |
| FString | GetCurrentLanguage () |
| Get the current language (for localization) as an IETF language tag: | |
| FString | GetCurrentLocale () |
| Get the current locale (for internationalization) as an IETF language tag: | |
| TArray< FString > | GetLocalizedCultures (bool IncludeGame=true, bool IncludeEngine=false, bool IncludeEditor=false, bool IncludeAdditional=false) |
| Get the list of cultures that have localization data available for them. | |
| void | ClearCurrentAssetGroupCulture (const FName AssetGroup, bool SaveToConfig=false) |
| Clear the given asset group category culture. | |
| FString | GetSuitableCulture (TArray< FString > AvailableCultures, FString CultureToMatch, FString FallbackCulture="en") |
| Given a list of available cultures, try and find the most suitable culture from the list based on culture prioritization. eg) If your list was [en, fr, de] and the given culture was "en-US", this function would return "en". eg) If your list was [zh, ar, pl] and the given culture was "en-US", this function would return the fallback culture. | |
| bool | SetCurrentAssetGroupCulture (const FName AssetGroup, FString Culture, bool SaveToConfig=false) |
| Set the given asset group category culture from an IETF language tag (eg, "zh-Hans-CN"). | |
| bool | SetCurrentCulture (FString Culture, bool SaveToConfig=false) |
| Set the current culture. Note: This function is a sledgehammer, and will set both the language and locale, as well as clear out any asset group cultures that may be set. | |
| bool | SetCurrentLanguage (FString Culture, bool SaveToConfig=false) |
| Set only the current language (for localization). Note: Unless you're doing something advanced, you likely want SetCurrentLanguageAndLocale or SetCurrentCulture instead. | |
| bool | SetCurrentLanguageAndLocale (FString Culture, bool SaveToConfig=false) |
| Set the current language (for localization) and locale (for internationalization). | |
| bool | SetCurrentLocale (FString Culture, bool SaveToConfig=false) |
| Set only the current locale (for internationalization). Note: Unless you're doing something advanced, you likely want SetCurrentLanguageAndLocale or SetCurrentCulture instead. | |
Variables | |
Variables | |
| const FString | CurrentLanguage |
| const FString | CurrentLocale |
| const FString | CurrentCulture |
| void ClearCurrentAssetGroupCulture | ( | const FName | AssetGroup, |
| bool | SaveToConfig = false ) |
Clear the given asset group category culture.
| AssetGroup | The asset group to clear the culture for. |
| SaveToConfig | If true, save the new setting to the users' "GameUserSettings" config so that it persists after a reload. |
Get the display name of the given culture.
| Culture | The culture to get the display name of, as an IETF language tag (eg, "zh-Hans-CN") |
| Localized | True to get the localized display name (the name of the culture in its own language), or False to get the display name in the current language. |
Get the given asset group category culture. Note: Returns the current language if the group category doesn't have a culture override.
| AssetGroup | The asset group to get the culture for. |
| FString GetCurrentCulture | ( | ) |
Get the current culture as an IETF language tag:
| FString GetCurrentLanguage | ( | ) |
Get the current language (for localization) as an IETF language tag:
| FString GetCurrentLocale | ( | ) |
Get the current locale (for internationalization) as an IETF language tag:
| TArray< FString > GetLocalizedCultures | ( | bool | IncludeGame = true, |
| bool | IncludeEngine = false, | ||
| bool | IncludeEditor = false, | ||
| bool | IncludeAdditional = false ) |
Get the list of cultures that have localization data available for them.
| IncludeGame | Check for localized game resources. |
| IncludeEngine | Check for localized engine resources. |
| IncludeEditor | Check for localized editor resources. |
| IncludeAdditional | Check for localized additional (eg, plugin) resources. |
| FString GetNativeCulture | ( | ELocalizedTextSourceCategory | TextCategory | ) |
Get the native culture for the given localization category.
| FString GetSuitableCulture | ( | TArray< FString > | AvailableCultures, |
| FString | CultureToMatch, | ||
| FString | FallbackCulture = "en" ) |
Given a list of available cultures, try and find the most suitable culture from the list based on culture prioritization. eg) If your list was [en, fr, de] and the given culture was "en-US", this function would return "en". eg) If your list was [zh, ar, pl] and the given culture was "en-US", this function would return the fallback culture.
| AvailableCultures | List of available cultures to filter against (see GetLocalizedCultures). |
| CultureToMatch | Culture to try and match (see GetCurrentLanguage). |
| FallbackCulture | The culture to return if there is no suitable match in the list (typically your native culture, see GetNativeCulture). |
| bool SetCurrentAssetGroupCulture | ( | const FName | AssetGroup, |
| FString | Culture, | ||
| bool | SaveToConfig = false ) |
Set the given asset group category culture from an IETF language tag (eg, "zh-Hans-CN").
| AssetGroup | The asset group to set the culture for. |
| Culture | The culture to set, as an IETF language tag (eg, "zh-Hans-CN"). |
| SaveToConfig | If true, save the new setting to the users' "GameUserSettings" config so that it persists after a reload. |
| bool SetCurrentCulture | ( | FString | Culture, |
| bool | SaveToConfig = false ) |
Set the current culture. Note: This function is a sledgehammer, and will set both the language and locale, as well as clear out any asset group cultures that may be set.
| Culture | The culture to set, as an IETF language tag (eg, "zh-Hans-CN"). |
| SaveToConfig | If true, save the new setting to the users' "GameUserSettings" config so that it persists after a reload. |
| bool SetCurrentLanguage | ( | FString | Culture, |
| bool | SaveToConfig = false ) |
Set only the current language (for localization). Note: Unless you're doing something advanced, you likely want SetCurrentLanguageAndLocale or SetCurrentCulture instead.
| Culture | The language to set, as an IETF language tag (eg, "zh-Hans-CN"). |
| SaveToConfig | If true, save the new setting to the users' "GameUserSettings" config so that it persists after a reload. |
| bool SetCurrentLanguageAndLocale | ( | FString | Culture, |
| bool | SaveToConfig = false ) |
Set the current language (for localization) and locale (for internationalization).
| Culture | The language and locale to set, as an IETF language tag (eg, "zh-Hans-CN"). |
| SaveToConfig | If true, save the new setting to the users' "GameUserSettings" config so that it persists after a reload. |
| bool SetCurrentLocale | ( | FString | Culture, |
| bool | SaveToConfig = false ) |
Set only the current locale (for internationalization). Note: Unless you're doing something advanced, you likely want SetCurrentLanguageAndLocale or SetCurrentCulture instead.
| Culture | The locale to set, as an IETF language tag (eg, "zh-Hans-CN"). |
| SaveToConfig | If true, save the new setting to the users' "GameUserSettings" config so that it persists after a reload. |
| const FString CurrentCulture |
| const FString CurrentLanguage |
| const FString CurrentLocale |