UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FPolyglotTextData Struct Reference

#include <PolyglotTextData.h>

Public Member Functions

 FPolyglotTextData ()=default
 
CORE_API FPolyglotTextData (const ELocalizedTextSourceCategory &InCategory, const FString &InNamespace, const FString &InKey, const FString &InNativeString, const FString &InNativeCulture=FString())
 
CORE_API bool IsValid (FText *OutFailureReason=nullptr) const
 
CORE_API void SetCategory (const ELocalizedTextSourceCategory InCategory)
 
CORE_API ELocalizedTextSourceCategory GetCategory () const
 
CORE_API void SetNativeCulture (const FString &InNativeCulture)
 
CORE_API const FString & GetNativeCulture () const
 
CORE_API FString ResolveNativeCulture () const
 
CORE_API TArray< FString > GetLocalizedCultures () const
 
CORE_API void SetIdentity (const FString &InNamespace, const FString &InKey)
 
CORE_API void GetIdentity (FString &OutNamespace, FString &OutKey) const
 
CORE_API const FString & GetNamespace () const
 
CORE_API const FString & GetKey () const
 
CORE_API void SetNativeString (const FString &InNativeString)
 
CORE_API const FString & GetNativeString () const
 
CORE_API void AddLocalizedString (const FString &InCulture, const FString &InLocalizedString)
 
CORE_API void RemoveLocalizedString (const FString &InCulture)
 
CORE_API bool GetLocalizedString (const FString &InCulture, FString &OutLocalizedString) const
 
CORE_API void ClearLocalizedStrings ()
 
CORE_API void IsMinimalPatch (const bool InIsMinimalPatch)
 
CORE_API bool IsMinimalPatch () const
 
CORE_API FText GetText () const
 

Friends

struct Z_Construct_UScriptStruct_FPolyglotTextData_Statics
 

Detailed Description

Polyglot data that may be registered to the text localization manager at runtime.

Note
This struct is mirrored in NoExportTypes.h for UHT.

Constructor & Destructor Documentation

◆ FPolyglotTextData() [1/2]

FPolyglotTextData::FPolyglotTextData ( )
default

Default constructor

◆ FPolyglotTextData() [2/2]

FPolyglotTextData::FPolyglotTextData ( const ELocalizedTextSourceCategory InCategory,
const FString &  InNamespace,
const FString &  InKey,
const FString &  InNativeString,
const FString &  InNativeCulture = FString() 
)

Construct this polyglot data with an identity, optionally immediately providing the source text and native culture.

Member Function Documentation

◆ AddLocalizedString()

void FPolyglotTextData::AddLocalizedString ( const FString &  InCulture,
const FString &  InLocalizedString 
)

Add a localized string to this polyglot data.

Note
The native culture may also have a translation added via this function.

◆ ClearLocalizedStrings()

void FPolyglotTextData::ClearLocalizedStrings ( )

Clear the localized strings from this polyglot data.

◆ GetCategory()

ELocalizedTextSourceCategory FPolyglotTextData::GetCategory ( ) const

Get the category of this polyglot data.

◆ GetIdentity()

void FPolyglotTextData::GetIdentity ( FString &  OutNamespace,
FString &  OutKey 
) const

Get the identity of the text created from this polyglot data.

◆ GetKey()

const FString & FPolyglotTextData::GetKey ( ) const

Get the key of the text created from this polyglot data.

◆ GetLocalizedCultures()

TArray< FString > FPolyglotTextData::GetLocalizedCultures ( ) const

Get the localized cultures of this polyglot data.

◆ GetLocalizedString()

bool FPolyglotTextData::GetLocalizedString ( const FString &  InCulture,
FString &  OutLocalizedString 
) const

Get a localized string from this polyglot data.

◆ GetNamespace()

const FString & FPolyglotTextData::GetNamespace ( ) const

Get the namespace of the text created from this polyglot data.

◆ GetNativeCulture()

const FString & FPolyglotTextData::GetNativeCulture ( ) const

Get the native culture of this polyglot data.

◆ GetNativeString()

const FString & FPolyglotTextData::GetNativeString ( ) const

Get the native string of this polyglot data.

◆ GetText()

FText FPolyglotTextData::GetText ( ) const

Get the text instance created from this polyglot data.

◆ IsMinimalPatch() [1/2]

bool FPolyglotTextData::IsMinimalPatch ( ) const

Get whether this polyglot data is a minimal patch.

See also
bIsMinimalPatch.

◆ IsMinimalPatch() [2/2]

void FPolyglotTextData::IsMinimalPatch ( const bool  InIsMinimalPatch)

Set whether this polyglot data is a minimal patch.

See also
bIsMinimalPatch.

◆ IsValid()

bool FPolyglotTextData::IsValid ( FText OutFailureReason = nullptr) const

Is this polyglot data valid and can be registered with the text localization manager?

◆ RemoveLocalizedString()

void FPolyglotTextData::RemoveLocalizedString ( const FString &  InCulture)

Remove a localized string from this polyglot data.

◆ ResolveNativeCulture()

FString FPolyglotTextData::ResolveNativeCulture ( ) const

Resolve the native culture of this polyglot data, either using the native culture if specified, or inferring it from the category.

◆ SetCategory()

void FPolyglotTextData::SetCategory ( const ELocalizedTextSourceCategory  InCategory)

Set the category of this polyglot data.

Note
This affects when and how the data is loaded into the text localization manager.

◆ SetIdentity()

void FPolyglotTextData::SetIdentity ( const FString &  InNamespace,
const FString &  InKey 
)

Set the identity of the text created from this polyglot data.

Note
The key must not be empty.

◆ SetNativeCulture()

void FPolyglotTextData::SetNativeCulture ( const FString &  InNativeCulture)

Set the native culture of this polyglot data.

Note
This may be empty, and if empty, will be inferred from the native culture of the text category.

◆ SetNativeString()

void FPolyglotTextData::SetNativeString ( const FString &  InNativeString)

Set the native string of this polyglot data.

Note
The native string must not be empty.

Friends And Related Symbol Documentation

◆ Z_Construct_UScriptStruct_FPolyglotTextData_Statics

friend struct Z_Construct_UScriptStruct_FPolyglotTextData_Statics
friend

Needed to avoid member access issues in UHT generated code


The documentation for this struct was generated from the following files: