Navigation
API > API/Runtime > API/Runtime/Core
Singleton class that manages display strings for FText.
| Name | FTextLocalizationManager |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Internationalization/TextLocalizationManager.h |
| Include Path | #include "Internationalization/TextLocalizationManager.h" |
Syntax
class FTextLocalizationManager
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Internationalization/TextLocalizationManager.h | |||
| Internationalization/TextLocalizationManager.h | |||
FTextLocalizationManager
(
const FTextLocalizationManager& |
Internationalization/TextLocalizationManager.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FTextLocalizationManager() |
Internationalization/TextLocalizationManager.h |
Classes
| Name | Remarks |
|---|---|
| FTextRevisionChangedEvent | Event type for immediately reacting to changes in display strings for text. |
Structs
| Name | Remarks |
|---|---|
| FDisplayStringEntry | Data struct for tracking a display string. |
| FDisplayStringsByLocalizationTargetId | |
| FDisplayStringsForLocalizationTarget | |
| FUpdateLiveTableOptions |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FDisplayStringLookupTable | TMap< FTextId, FDisplayStringEntry > | Manages the currently loaded or registered text localizations. | Internationalization/TextLocalizationManager.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnTextRevisionChangedEvent | FTextLocalizationManager::FTextRevisionChangedEvent | Internationalization/TextLocalizationManager.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AsyncLocalizationTask | FGraphEventRef | The latest async localization task (if any). | Internationalization/TextLocalizationManager.h | |
| bIsGameLocalizationPreviewEnabled | bool | Internationalization/TextLocalizationManager.h | ||
| bIsLocalizationLocked | bool | Internationalization/TextLocalizationManager.h | ||
| DisplayStringLookupTable | FDisplayStringLookupTable | Internationalization/TextLocalizationManager.h | ||
| DisplayStringsByLocalizationTargetId | FDisplayStringsByLocalizationTargetId | Internationalization/TextLocalizationManager.h | ||
| DisplayStringTableRW | FRWLock | Internationalization/TextLocalizationManager.h | ||
| GameLocalizationPreviewAutoEnableCount | uint8 | Internationalization/TextLocalizationManager.h | ||
| InitializedFlags | std::atomic< ETextLocalizationManagerInitializedFlags > | Internationalization/TextLocalizationManager.h | ||
| LocalizedTextSources | TArray< TSharedPtr< ILocalizedTextSource > > | Array of registered localized text sources, sorted by priority ( | Internationalization/TextLocalizationManager.h | |
| LocalTextRevisions | TMap< FTextId, uint16 > | Internationalization/TextLocalizationManager.h | ||
| LocResTextSource | TSharedPtr< class FLocalizationResourceTextSource > | The LocRes text source (this is also added to LocalizedTextSources, but we keep a pointer to it directly so we can patch in chunked LocRes data at runtime) | Internationalization/TextLocalizationManager.h | |
| PolyglotTextSource | TSharedPtr< class FPolyglotTextSource > | The polyglot text source (this is also added to LocalizedTextSources, but we keep a pointer to it directly so we can add new polyglot data to it at runtime) | Internationalization/TextLocalizationManager.h | |
| TextRevisionCounter | uint16 | Internationalization/TextLocalizationManager.h | ||
| TextRevisionRW | FRWLock | Internationalization/TextLocalizationManager.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CompactDataStructures() |
Internationalization/TextLocalizationManager.h | ||
void ConfigureGameLocalizationPreviewLanguage
(
const FString& CultureName |
Configure the "preview language" setting used for the game localization preview. | Internationalization/TextLocalizationManager.h | |
void DisableGameLocalizationPreview () |
Disable the game localization preview. | Internationalization/TextLocalizationManager.h | |
void DumpMemoryInfo() |
Internationalization/TextLocalizationManager.h | ||
void EnableGameLocalizationPreview
(
const FString& CultureName |
Enable the game localization preview using the given language, or the native language if the culture name is empty. | Internationalization/TextLocalizationManager.h | |
void EnableGameLocalizationPreview () |
Enable the game localization preview using the current "preview language" setting, or the native culture if no "preview language" is set. | Internationalization/TextLocalizationManager.h | |
FTextConstDisplayStringPtr FindDisplayString
(
const FTextKey& Namespace, |
Finds and returns the display string with the given namespace and key, if it exists. | Internationalization/TextLocalizationManager.h | |
FString GetConfiguredGameLocalizationPreviewLanguage() |
Get the configured "preview language" setting used for the game localization preview (if any). | Internationalization/TextLocalizationManager.h | |
FTextConstDisplayStringPtr GetDisplayString
(
const FTextKey& Namespace, |
Get the current display string for the given namespace and key, if any. | Internationalization/TextLocalizationManager.h | |
int32 GetLocalizationTargetPathId
(
FStringView InLocalizationTargetPath |
Given a localization target path, get the ID associated with it. | Internationalization/TextLocalizationManager.h | |
TArray< FString > GetLocalizedCultureNames
(
const ELocalizationLoadFlags InLoadFlags |
Get a list of culture names that we have localized resource data for (ELocalizationLoadFlags controls which resources should be checked). | Internationalization/TextLocalizationManager.h | |
uint16 GetLocalRevisionForTextId
(
const FTextId& InTextId |
Attempts to find a local revision history for the given text ID. | Internationalization/TextLocalizationManager.h | |
bool GetLocResID
(
const FTextKey& Namespace, |
If an entry exists for the specified namespace and key, returns true and provides the localization resource identifier from which it was loaded. | Internationalization/TextLocalizationManager.h | |
FString GetNativeCultureName
(
const ELocalizedTextSourceCategory InCategory |
Given a localization category, get the native culture for the category (if known). | Internationalization/TextLocalizationManager.h | |
FString GetRequestedLanguageName() |
Get the language that will be requested during localization initialization, based on the hierarchy of: command line -> configs -> OS default. | Internationalization/TextLocalizationManager.h | |
FString GetRequestedLocaleName() |
Get the locale that will be requested during localization initialization, based on the hierarchy of: command line -> configs -> OS default. | Internationalization/TextLocalizationManager.h | |
uint16 GetTextRevision () |
Returns the current text revision number. | Internationalization/TextLocalizationManager.h | |
void GetTextRevisions
(
const FTextId& InTextId, |
Get both the global and local revision for the given text ID. | Internationalization/TextLocalizationManager.h | |
void HandleLocalizationTargetsMounted
(
TArrayView< const FString > LocalizationTargetPaths, |
Called when paths containing additional localization target data (LocRes) are mounted, to allow the display strings to dynamically update without waiting for a refresh. | Internationalization/TextLocalizationManager.h | |
void HandleLocalizationTargetsUnmounted
(
TArrayView< const FString > LocalizationTargetPaths, |
Called when paths containing additional localization target data (LocRes) are unmounted, to allow the display strings to be unloaded. | Internationalization/TextLocalizationManager.h | |
bool IsGameLocalizationPreviewEnabled() |
Is the game localization preview enabled for a non-native language? | Internationalization/TextLocalizationManager.h | |
bool IsLocalizationLocked() |
Is the localization of this game currently locked? (ie, can it be edited in the UI?). | Internationalization/TextLocalizationManager.h | |
void NotifyWhenAsyncTasksCompleted
(
TUniqueFunction< void()>&& Notification |
Call the given function when any current async tasks have finished. | Internationalization/TextLocalizationManager.h | |
| Notify that the game localization preview should no longer automatically enable itself under certain circumstances (such as changing the preview language via the UI) due to a state change (such as PIE ending). | Internationalization/TextLocalizationManager.h | ||
| Notify that the game localization preview should automatically enable itself under certain circumstances (such as changing the preview language via the UI) due to a state change (such as PIE starting). | Internationalization/TextLocalizationManager.h | ||
void RefreshResources
(
TUniqueFunction< void()>&& Notification |
Reloads resources for the current culture. | Internationalization/TextLocalizationManager.h | |
void RegisterPolyglotTextData
(
TArrayView< const FPolyglotTextData > InPolyglotTextDataArray, |
Internationalization/TextLocalizationManager.h | ||
void RegisterPolyglotTextData
(
const FPolyglotTextData& InPolyglotTextData, |
Register a polyglot text data with the text localization manager. | Internationalization/TextLocalizationManager.h | |
void RegisterTextSource
(
const TSharedRef< ILocalizedTextSource >& InLocalizedTextSource, |
Register a localized text source with the text localization manager. | Internationalization/TextLocalizationManager.h | |
bool ShouldForceLoadGameLocalization() |
True if we should force load game localization data. | Internationalization/TextLocalizationManager.h | |
bool ShouldGameLocalizationPreviewAutoEnable() |
Should the game localization preview automatically enable itself under certain circumstances? | Internationalization/TextLocalizationManager.h | |
void UpdateFromLocalizationResource
(
const FTextLocalizationResource& TextLocalizationResource |
Internationalization/TextLocalizationManager.h | ||
void UpdateFromLocalizationResource
(
const FString& LocalizationResourceFilePath |
Updates display string entries and adds new display string entries based on localizations found in a specified localization resource. | Internationalization/TextLocalizationManager.h | |
void WaitForAsyncTasks () |
Wait for any current async tasks to finish. | Internationalization/TextLocalizationManager.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FTextLocalizationManager & Get() |
Singleton accessor | Internationalization/TextLocalizationManager.h | |
static bool IsDisplayStringSupportEnabled() |
Internationalization/TextLocalizationManager.h | ||
static void TearDown() |
Internationalization/TextLocalizationManager.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTextLocalizationManager & operator=
(
const FTextLocalizationManager& |
Internationalization/TextLocalizationManager.h | ||
| Internationalization/TextLocalizationManager.h |