RealDocs

UKismetTextLibrary::TextIsCultureInvariant

function Engine Blueprint Since unknown
#include "Kismet/KismetTextLibrary.h"
Access: public Specifiers: staticBlueprintPure

Description

Returns true if the given text is culture invariant, meaning it won't change when the active culture changes.

Caveats & Gotchas

  • Text produced by Conv_StringToText, Conv_NameToText, and MakeInvariantText all report true here, since none of them attach localization data.
  • This is a metadata check on the FText instance, not a linguistic analysis of its content — text that happens to read the same in every language still needs to have been created as invariant to pass.

Signature

static bool TextIsCultureInvariant(const FText& InText)

Parameters

Name Type Description Default
InText const FText& The text to check.

Return Type

bool

Example

Warn about non-localizable UI copy C++
FText Label = GetWidgetLabel();
if (UKismetTextLibrary::TextIsCultureInvariant(Label))
{
    UE_LOG(LogTemp, Warning, TEXT("Label is not localizable"));
}

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.