![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <TextLocalizationManager.h>
Static Public Member Functions | |
| static CORE_API FTextLocalizationManager & | Get () |
| static CORE_API void | TearDown () |
| static CORE_API bool | IsDisplayStringSupportEnabled () |
Public Attributes | |
| FTextRevisionChangedEvent | OnTextRevisionChangedEvent |
Singleton class that manages display strings for FText.
| FTextLocalizationManager::~FTextLocalizationManager | ( | ) |
| void FTextLocalizationManager::CompactDataStructures | ( | ) |
| void FTextLocalizationManager::DumpMemoryInfo | ( | ) | const |
| FTextConstDisplayStringPtr FTextLocalizationManager::FindDisplayString | ( | const FTextKey & | Namespace, |
| const FTextKey & | Key, | ||
| const FString *const | SourceStringPtr = nullptr |
||
| ) | const |
Finds and returns the display string with the given namespace and key, if it exists.
|
static |
Singleton accessor
| FTextConstDisplayStringPtr FTextLocalizationManager::GetDisplayString | ( | const FTextKey & | Namespace, |
| const FTextKey & | Key, | ||
| const FString *const | SourceStringPtr | ||
| ) | const |
Get the current display string for the given namespace and key, if any.
Unlike FindDisplayString:
| int32 FTextLocalizationManager::GetLocalizationTargetPathId | ( | FStringView | InLocalizationTargetPath | ) |
Given a localization target path, get the ID associated with it.
| TArray< FString > FTextLocalizationManager::GetLocalizedCultureNames | ( | const ELocalizationLoadFlags | InLoadFlags | ) | const |
Get a list of culture names that we have localized resource data for (ELocalizationLoadFlags controls which resources should be checked).
Attempts to find a local revision history for the given text ID. This will only be set if the display string has been changed since the localization manager version has been changed (eg, if it has been edited while keeping the same key).
| FString FTextLocalizationManager::GetNativeCultureName | ( | const ELocalizedTextSourceCategory | InCategory | ) | const |
Given a localization category, get the native culture for the category (if known).
| FString FTextLocalizationManager::GetRequestedLanguageName | ( | ) | const |
Get the language that will be requested during localization initialization, based on the hierarchy of: command line -> configs -> OS default.
| FString FTextLocalizationManager::GetRequestedLocaleName | ( | ) | const |
Get the locale that will be requested during localization initialization, based on the hierarchy of: command line -> configs -> OS default.
| UE_AUTORTFM_ALWAYS_OPEN uint16 FTextLocalizationManager::GetTextRevision | ( | ) | const |
Returns the current text revision number. This value can be cached when caching information from the text localization manager. If the revision does not match, cached information may be invalid and should be recached.
| UE_AUTORTFM_ALWAYS_OPEN void FTextLocalizationManager::GetTextRevisions | ( | const FTextId & | InTextId, |
| uint16 & | OutGlobalTextRevision, | ||
| uint16 & | OutLocalTextRevision | ||
| ) | const |
Get both the global and local revision for the given text ID.
| void FTextLocalizationManager::HandleLocalizationTargetsMounted | ( | TArrayView< const FString > | LocalizationTargetPaths, |
| TUniqueFunction< void()> && | Notification = nullptr |
||
| ) |
Called when paths containing additional localization target data (LocRes) are mounted, to allow the display strings to dynamically update without waiting for a refresh.
| void FTextLocalizationManager::HandleLocalizationTargetsUnmounted | ( | TArrayView< const FString > | LocalizationTargetPaths, |
| TUniqueFunction< void()> && | Notification = nullptr |
||
| ) |
Called when paths containing additional localization target data (LocRes) are unmounted, to allow the display strings to be unloaded.
|
static |
| void FTextLocalizationManager::NotifyWhenAsyncTasksCompleted | ( | TUniqueFunction< void()> && | Notification | ) |
Call the given function when any current async tasks have finished.
| void FTextLocalizationManager::RefreshResources | ( | TUniqueFunction< void()> && | Notification = nullptr | ) |
Reloads resources for the current culture.
| void FTextLocalizationManager::RegisterPolyglotTextData | ( | const FPolyglotTextData & | InPolyglotTextData, |
| const bool | InAddDisplayString = true |
||
| ) |
Register a polyglot text data with the text localization manager.
| void FTextLocalizationManager::RegisterPolyglotTextData | ( | TArrayView< const FPolyglotTextData > | InPolyglotTextDataArray, |
| const bool | InAddDisplayStrings = true |
||
| ) |
| void FTextLocalizationManager::RegisterTextSource | ( | const TSharedRef< ILocalizedTextSource > & | InLocalizedTextSource, |
| const bool | InRefreshResources = true |
||
| ) |
Register a localized text source with the text localization manager.
| bool FTextLocalizationManager::ShouldForceLoadGameLocalization | ( | ) | const |
True if we should force load game localization data.
|
static |
| FTextLocalizationManager::UE_NONCOPYABLE | ( | FTextLocalizationManager | ) |
| void FTextLocalizationManager::UpdateFromLocalizationResource | ( | const FString & | LocalizationResourceFilePath | ) |
Updates display string entries and adds new display string entries based on localizations found in a specified localization resource.
| void FTextLocalizationManager::UpdateFromLocalizationResource | ( | const FTextLocalizationResource & | TextLocalizationResource | ) |
| void FTextLocalizationManager::WaitForAsyncTasks | ( | ) |
Wait for any current async tasks to finish.
Async tasks will be started for anything that loads localization data (eg, initialization, language changes, requests to refresh the localization data, requests to load additional localization data for chunked targets, or requests to load additional localization data for explicitly loaded plugins).
While the engine automatically waits at certain points during initialization, you may find that you need to add your own waits if you cause additional localization data to load post-initialization (eg, because you're using chunked localization targets or are explicitly loading plugins). A good place to add a wait in that case might be at the end of your loading screen, before showing your main menu or game world.
|
friend |
| FTextRevisionChangedEvent FTextLocalizationManager::OnTextRevisionChangedEvent |
Event type for immediately reacting to changes in display strings for text.