unreal.InternationalizationLibrary
¶
- class unreal.InternationalizationLibrary(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibrary
Kismet Internationalization Library
C++ Source:
Module: Engine
File: KismetInternationalizationLibrary.h
- classmethod clear_current_asset_group_culture(asset_group, save_to_config=False) None ¶
Clear the given asset group category culture.
- classmethod get_culture_display_name(culture, localized=True) str ¶
Get the display name of the given culture.
- Parameters:
- Returns:
The display name of the culture, or the given culture code on failure.
- Return type:
- classmethod get_current_asset_group_culture(asset_group) str ¶
Get the given asset group category culture. note: Returns the current language if the group category doesn’t have a culture override.
- classmethod get_current_culture() str ¶
- Get the current culture as an IETF language tag:
A two-letter ISO 639-1 language code (eg, “zh”).
An optional four-letter ISO 15924 script code (eg, “Hans”).
An optional two-letter ISO 3166-1 country code (eg, “CN”).
note: This function exists for legacy API parity with SetCurrentCulture and is equivalent to GetCurrentLanguage.
- Returns:
The culture as an IETF language tag (eg, “zh-Hans-CN”).
- Return type:
- classmethod get_current_language() str ¶
- Get the current language (for localization) as an IETF language tag:
A two-letter ISO 639-1 language code (eg, “zh”).
An optional four-letter ISO 15924 script code (eg, “Hans”).
An optional two-letter ISO 3166-1 country code (eg, “CN”).
- Returns:
The language as an IETF language tag (eg, “zh-Hans-CN”).
- Return type:
- classmethod get_current_locale() str ¶
- Get the current locale (for internationalization) as an IETF language tag:
A two-letter ISO 639-1 language code (eg, “zh”).
An optional four-letter ISO 15924 script code (eg, “Hans”).
An optional two-letter ISO 3166-1 country code (eg, “CN”).
- Returns:
The locale as an IETF language tag (eg, “zh-Hans-CN”).
- Return type:
- classmethod get_localized_cultures(include_game=True, include_engine=False, include_editor=False, include_additional=False) Array[str] ¶
Get the list of cultures that have localization data available for them.
- Parameters:
- Returns:
The list of cultures as IETF language tags (eg, “zh-Hans-CN”).
- Return type:
- classmethod get_native_culture(text_category) str ¶
Get the native culture for the given localization category.
- Parameters:
text_category (LocalizedTextSourceCategory) –
- Returns:
The culture as an IETF language tag (eg, “zh-Hans-CN”).
- Return type:
- classmethod get_suitable_culture(available_cultures, culture_to_match, fallback_culture='en') str ¶
- 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.
- Parameters:
available_cultures (Array[str]) – List of available cultures to filter against (see GetLocalizedCultures).
culture_to_match (str) – Culture to try and match (see GetCurrentLanguage).
fallback_culture (str) – The culture to return if there is no suitable match in the list (typically your native culture, see GetNativeCulture).
- Returns:
The culture as an IETF language tag (eg, “zh-Hans-CN”).
- Return type:
- classmethod set_current_asset_group_culture(asset_group, culture, save_to_config=False) bool ¶
Set the given asset group category culture from an IETF language tag (eg, “zh-Hans-CN”).
- Parameters:
- Returns:
True if the culture was set, false otherwise.
- Return type:
- classmethod set_current_culture(culture, save_to_config=False) bool ¶
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.
- classmethod set_current_language(culture, save_to_config=False) bool ¶
Set only the current language (for localization). note: Unless you’re doing something advanced, you likely want SetCurrentLanguageAndLocale or SetCurrentCulture instead.
- classmethod set_current_language_and_locale(culture, save_to_config=False) bool ¶
Set the current language (for localization) and locale (for internationalization).
- Parameters:
- Returns:
True if the language and locale were set, false otherwise.
- Return type: