FTextLocalizationManager

Singleton class that manages display strings for [FText](API\Runtime\Core\Internationalization\FText).

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Internationalization/TextLocalizationManager.h

Include

#include "Internationalization/TextLocalizationManager.h"

Syntax

class FTextLocalizationManager

Remarks

Singleton class that manages display strings for FText.

Variables

Constructors

No constructors are accessible with public or protected access.

Functions

Name Description

Public function

bool

 

AddDisplayString

(
    const FTextDisplayStringRef& Displ...,
    const FTextKey& Namespace,
    const FTextKey& Key
)

Attempts to register the specified display string, associating it with the specified namespace and key.

Public function

void

 

CompactDataStructures()

Public function

void

 

ConfigureGameLocalizationPreviewLanguage

(
    const FString& CultureName
)

Configure the "preview language" setting used for the game localization preview.

Public function

void

 

DisableGameLocalizationPreview()

Disable the game localization preview.

Public function

void

 

DumpMemoryInfo()

Public function

void

 

EnableGameLocalizationPreview

(
    const FString& CultureName
)

Enable the game localization preview using the given language, or the native language if the culture name is empty.

Public function

void

 

EnableGameLocalizationPreview()

Enable the game localization preview using the current "preview language" setting, or the native culture if no "preview language" is set.

Public function

FTextDisplay...

 

FindDisplayString

(
    const FTextKey& Namespace,
    const FTextKey& Key,
    const FString*const SourceStri...
)

Finds and returns the display string with the given namespace and key, if it exists.

Public function

bool

 

FindNamespaceAndKeyFromDisplayString

(
    const FTextDisplayStringRef& InDis...,
    FTextKey& OutNamespace,
    FTextKey& OutKey
)

Finds the namespace and key associated with the specified display string.

Public function

bool

 

FindNamespaceAndKeyFromDisplayString

(
    const FTextDisplayStringRef& InDis...,
    FString& OutNamespace,
    FString& OutKey
)

Finds the namespace and key associated with the specified display string.

Public function Static

FTextLocaliz...

 

Get()

Singleton accessor

Public function Const

FString

 

GetConfiguredGameLocalizationPreviewLanguage()

Get the configured "preview language" setting used for the game localization preview (if any).

Public function

FTextDisplay...

 

GetDisplayString

(
    const FTextKey& Namespace,
    const FTextKey& Key,
    const FString*const SourceStri...
)

Returns a display string with the given namespace and key.

Public function Const

TArray< FStr...

 

GetLocalizedCultureNames

(
    const ELocalizationLoadFlags InLoad...
)

Get a list of culture names that we have localized resource data for (ELocalizationLoadFlags controls which resources should be checked).

Public function

uint16

 

GetLocalRevisionForDisplayString

(
    const FTextDisplayStringRef& InDis...
)

Attempts to find a local revision history for the given display string.

Public function

bool

 

GetLocResID

(
    const FTextKey& Namespace,
    const FTextKey& Key,
    FString& OutLocResId
)

If an entry exists for the specified namespace and key, returns true and provides the localization resource identifier from which it was loaded.

Public function Const

FString

 

GetNativeCultureName

(
    const ELocalizedTextSourceCategory ...
)

Given a localization category, get the native culture for the category (if known).

Public function Const

FString

 

GetRequestedLanguageName()

Get the language that will be requested during localization initialization, based on the hierarchy of: command line -> configs -> OS default.

Public function Const

FString

 

GetRequestedLocaleName()

Get the locale that will be requested during localization initialization, based on the hierarchy of: command line -> configs -> OS default.

Public function Const

uint16

 

GetTextRevision()

Returns the current text revision number.

Public function Const

bool

 

IsGameLocalizationPreviewEnabled()

Is the game localization preview enabled for a non-native language?

Public function Const

bool

 

IsLocalizationLocked()

Is the localization of this game currently locked? (ie, can it be edited in the UI?).

Public function

void

 

PopAutoEnableGameLocalizationPreview()

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).

Public function

void

 

PushAutoEnableGameLocalizationPreview()

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).

Public function

void

 

RefreshResources()

Reloads resources for the current culture.

Public function

void

 

RegisterPolyglotTextData

(
    const FPolyglotTextData& InPolyglo...,
    const bool InAddDisplayString
)

Register a polyglot text data with the text localization manager.

Public function

void

 

RegisterPolyglotTextData

(
    TArrayView< const FPolyglotTextData...,
    const bool InAddDisplayStrings
)

Register a polyglot text data with the text localization manager.

Public function

void

 

RegisterTextSource

(
    const TSharedRef< ILocalizedTextSou...,
    const bool InRefreshResources
)

Register a localized text source with the text localization manager.

Public function Const

bool

 

ShouldGameLocalizationPreviewAutoEnable()

Should the game localization preview automatically enable itself under certain circumstances?

Public function Static

void

 

TearDown()

Public function

bool

 

UpdateDisplayString

(
    const FTextDisplayStringRef& Displ...,
    const FString& Value,
    const FTextKey& Namespace,
    const FTextKey& Key
)

Updates the underlying value of a display string and associates it with a specified namespace and key, then returns true.

Public function

void

 

UpdateFromLocalizationResource

(
    const FString& LocalizationResourc...
)

Updates display string entries and adds new display string entries based on localizations found in a specified localization resource.

Public function

void

 

UpdateFromLocalizationResource

(
    const FTextLocalizationResource& T...
)

Updates display string entries and adds new display string entries based on localizations found in a specified localization resource.

Classes

Name

Description

Public class

FTextRevisionChangedEvent

Event type for immediately reacting to changes in display strings for text.

Typedefs

Name

Description

FDisplayStringLookupTable

Manages the currently loaded or registered text localizations.

FNamespaceKeyLookupTable

Manages the identity associated with a display string, for use in looking up namespace and key from a display string.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss