G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
Text Namespace Reference

Functions

Utilities|String
FString Conv_TextToString (FText InText)
 Converts localizable text to the string.
Utilities|Text
FText AsCurrencyBase (int BaseValue, FString CurrencyCode)
 Generate an FText that represents the passed number as currency in the current culture. BaseVal is specified in the smallest fractional value of the currency and will be converted for formatting according to the selected culture. Keep in mind the CurrencyCode is completely independent of the culture it's displayed in (and they do not imply one another). For example: FText::AsCurrencyBase(650, TEXT("EUR")); would return an FText of "<EUR>6.50" in most English cultures (en_US/en_UK) and "6,50<EUR>" in Spanish (es_ES) (where <EUR> is U+20AC).
FText AsDate_DateTime (FDateTime InDateTime)
 Converts a passed in date & time to a text, formatted as a date using an invariant timezone. This will use the given date & time as-is, so it's assumed to already be in the correct timezone.
FText AsDateTime_DateTime (FDateTime In)
 Converts a passed in date & time to a text, formatted as a date & time using an invariant timezone. This will use the given date & time as-is, so it's assumed to already be in the correct timezone.
FText AsCurrency_Integer (int Value, ERoundingMode RoundingMode, bool bAlwaysSign=false, bool bUseGrouping=true, int MinimumIntegralDigits=1, int MaximumIntegralDigits=324, int MinimumFractionalDigits=0, int MaximumFractionalDigits=3, FString CurrencyCode="")
 Converts a passed in integer to a text formatted as a currency.
FText AsPercent_Float (float32 Value, ERoundingMode RoundingMode, bool bAlwaysSign=false, bool bUseGrouping=true, int MinimumIntegralDigits=1, int MaximumIntegralDigits=324, int MinimumFractionalDigits=0, int MaximumFractionalDigits=3)
 Converts a passed in float to a text, formatted as a percent.
FText AsTime_DateTime (FDateTime In)
 Converts a passed in date & time to a text, formatted as a time using an invariant timezone. This will use the given date & time as-is, so it's assumed to already be in the correct timezone.
FText AsTimespan_Timespan (FTimespan InTimespan)
 Converts a passed in time span to a text, formatted as a time span.
FText AsTimeZoneDate_DateTime (FDateTime InDateTime, FString InTimeZone="")
 Converts a passed in date & time to a text, formatted as a date using the given timezone (default is the local timezone). This will convert the given date & time from UTC to the given timezone (taking into account DST).
FText AsTimeZoneDateTime_DateTime (FDateTime InDateTime, FString InTimeZone="")
 Converts a passed in date & time to a text, formatted as a date & time using the given timezone (default is the local timezone). This will convert the given date & time from UTC to the given timezone (taking into account DST).
FText AsTimeZoneTime_DateTime (FDateTime InDateTime, FString InTimeZone="")
 Converts a passed in date & time to a text, formatted as a time using the given timezone (default is the local timezone). This will convert the given date & time from UTC to the given timezone (taking into account DST).
FText Conv_BoolToText (bool InBool)
 Converts a boolean value to formatted text, either 'true' or 'false'.
FText Conv_ByteToText (uint8 Value)
 Converts a byte value to formatted text.
FText Conv_ColorToText (FLinearColor InColor)
 Converts a linear color value to localized formatted text, in the form '(R=,G=,B=,A=)'.
FText Conv_DoubleToText (float Value, ERoundingMode RoundingMode, bool bAlwaysSign=false, bool bUseGrouping=true, int MinimumIntegralDigits=1, int MaximumIntegralDigits=324, int MinimumFractionalDigits=0, int MaximumFractionalDigits=3)
 Converts a passed in double to text based on formatting options.
FText Conv_Int64ToText (int64 Value, bool bAlwaysSign=false, bool bUseGrouping=true, int MinimumIntegralDigits=1, int MaximumIntegralDigits=324)
 Converts a passed in integer to text based on formatting options.
FText Conv_IntToText (int Value, bool bAlwaysSign=false, bool bUseGrouping=true, int MinimumIntegralDigits=1, int MaximumIntegralDigits=324)
 Converts a passed in integer to text based on formatting options.
FText Conv_NameToText (FName InName)
 Converts Name to culture invariant text.
FText Conv_ObjectToText (UObject InObj)
 Converts a UObject value to culture invariant text by calling the object's GetName method.
FText Conv_RotatorToText (FRotator InRot)
 Converts a rotator value to localized formatted text, in the form 'P= Y= R='.
FText Conv_StringToText (FString InString)
 Converts string to culture invariant text. Use 'Make Literal Text' to create localizable text, or 'Format' if concatenating localized text.
FText Conv_Vector2dToText (FVector2D InVec)
 Converts a vector2d value to localized formatted text, in the form 'X= Y='.
FText Conv_TransformToText (FTransform InTrans)
 Converts a transform value to localized formatted text, in the form 'Translation: X= Y= Z= Rotation: P= Y= R= Scale: X= Y= Z='.
FText AsCurrency_Float (float32 Value, ERoundingMode RoundingMode, bool bAlwaysSign=false, bool bUseGrouping=true, int MinimumIntegralDigits=1, int MaximumIntegralDigits=324, int MinimumFractionalDigits=0, int MaximumFractionalDigits=3, FString CurrencyCode="")
 Converts a passed in float to a text formatted as a currency.
FText Conv_VectorToText (FVector InVec)
 Converts a vector value to localized formatted text, in the form 'X= Y= Z='.
bool EqualEqual_IgnoreCase_TextText (FText A, FText B)
 Returns true if A and B are linguistically equal (A == B), ignoring case.
bool EqualEqual_TextText (FText A, FText B)
 Returns true if A and B are linguistically equal (A == B).
bool FindTextInLocalizationTable (FString Namespace, FString Key, FText &OutText, FString SourceString="")
 Attempts to find existing Text using the representation found in the loc tables for the specified namespace and key.
FText GetEmptyText ()
 Returns an empty piece of text.
bool GetTextId (FText Text, FString &OutNamespace, FString &OutKey)
 Attempts to get the ID (namespace and key) used by the given text.
FString GetTextSourceString (FText Text)
 Get the (non-localized) source string of the given text. Note: For a generated text (eg, the result of a Format), this will deep build the source string as if the generation had run for the native language.
void IsPolyglotDataValid (FPolyglotTextData PolyglotData, bool &IsValid, FText &ErrorMessage)
 Check whether the given polyglot data is valid.
FText MakeInvariantText (FString InString)
 Converts string to culture invariant text. Use 'Make Literal Text' to create localizable text, or 'Format' if concatenating localized text.
bool NotEqual_IgnoreCase_TextText (FText A, FText B)
 Returns true if A and B are linguistically not equal (A != B), ignoring case.
bool NotEqual_TextText (FText A, FText B)
 Returns true if A and B are linguistically not equal (A != B).
FText PolyglotDataToText (FPolyglotTextData PolyglotData)
 Get the text instance created from this polyglot data.
bool StringTableIdAndKeyFromText (FText Text, FName &OutTableId, FString &OutKey)
 Attempts to get the String Table ID and key used by the given text.
FText TextFromStringTable (const FName TableId, FString Key)
 Attempts to create a text instance from a string table ID and key. Note: This exists to allow programmatic look-up of a string table entry from dynamic content - you should favor setting your string table reference on a text property or pin wherever possible as it is significantly more robust (see "Make Literal Text").
bool TextIsCultureInvariant (FText InText)
 Returns true if text is culture invariant.
bool TextIsEmpty (FText InText)
 Returns true if text is empty.
bool TextIsFromStringTable (FText Text)
 Returns true if the given text is referencing a string table.
bool TextIsTransient (FText InText)
 Returns true if text is transient.
FText TextToLower (FText InText)
 Transforms the text to lowercase in a culture correct way. Note: The returned instance is linked to the original and will be rebuilt if the active culture is changed.
FText TextToUpper (FText InText)
 Transforms the text to uppercase in a culture correct way. Note: The returned instance is linked to the original and will be rebuilt if the active culture is changed.
FText TextTrimPreceding (FText InText)
 Removes whitespace characters from the front of the text.
FText TextTrimPrecedingAndTrailing (FText InText)
 Removes whitespace characters from the front and end of the text.
FText TextTrimTrailing (FText InText)
 Removes trailing whitespace characters.

Variables

Variables
const FText EmptyText

Function Documentation

◆ AsCurrency_Float()

FText AsCurrency_Float ( float32 Value,
ERoundingMode RoundingMode,
bool bAlwaysSign = false,
bool bUseGrouping = true,
int MinimumIntegralDigits = 1,
int MaximumIntegralDigits = 324,
int MinimumFractionalDigits = 0,
int MaximumFractionalDigits = 3,
FString CurrencyCode = "" )

Converts a passed in float to a text formatted as a currency.

◆ AsCurrency_Integer()

FText AsCurrency_Integer ( int Value,
ERoundingMode RoundingMode,
bool bAlwaysSign = false,
bool bUseGrouping = true,
int MinimumIntegralDigits = 1,
int MaximumIntegralDigits = 324,
int MinimumFractionalDigits = 0,
int MaximumFractionalDigits = 3,
FString CurrencyCode = "" )

Converts a passed in integer to a text formatted as a currency.

◆ AsCurrencyBase()

FText AsCurrencyBase ( int BaseValue,
FString CurrencyCode )

Generate an FText that represents the passed number as currency in the current culture. BaseVal is specified in the smallest fractional value of the currency and will be converted for formatting according to the selected culture. Keep in mind the CurrencyCode is completely independent of the culture it's displayed in (and they do not imply one another). For example: FText::AsCurrencyBase(650, TEXT("EUR")); would return an FText of "<EUR>6.50" in most English cultures (en_US/en_UK) and "6,50<EUR>" in Spanish (es_ES) (where <EUR> is U+20AC).

◆ AsDate_DateTime()

FText AsDate_DateTime ( FDateTime InDateTime)

Converts a passed in date & time to a text, formatted as a date using an invariant timezone. This will use the given date & time as-is, so it's assumed to already be in the correct timezone.

◆ AsDateTime_DateTime()

FText AsDateTime_DateTime ( FDateTime In)

Converts a passed in date & time to a text, formatted as a date & time using an invariant timezone. This will use the given date & time as-is, so it's assumed to already be in the correct timezone.

◆ AsPercent_Float()

FText AsPercent_Float ( float32 Value,
ERoundingMode RoundingMode,
bool bAlwaysSign = false,
bool bUseGrouping = true,
int MinimumIntegralDigits = 1,
int MaximumIntegralDigits = 324,
int MinimumFractionalDigits = 0,
int MaximumFractionalDigits = 3 )

Converts a passed in float to a text, formatted as a percent.

◆ AsTime_DateTime()

FText AsTime_DateTime ( FDateTime In)

Converts a passed in date & time to a text, formatted as a time using an invariant timezone. This will use the given date & time as-is, so it's assumed to already be in the correct timezone.

◆ AsTimespan_Timespan()

FText AsTimespan_Timespan ( FTimespan InTimespan)

Converts a passed in time span to a text, formatted as a time span.

◆ AsTimeZoneDate_DateTime()

FText AsTimeZoneDate_DateTime ( FDateTime InDateTime,
FString InTimeZone = "" )

Converts a passed in date & time to a text, formatted as a date using the given timezone (default is the local timezone). This will convert the given date & time from UTC to the given timezone (taking into account DST).

◆ AsTimeZoneDateTime_DateTime()

FText AsTimeZoneDateTime_DateTime ( FDateTime InDateTime,
FString InTimeZone = "" )

Converts a passed in date & time to a text, formatted as a date & time using the given timezone (default is the local timezone). This will convert the given date & time from UTC to the given timezone (taking into account DST).

◆ AsTimeZoneTime_DateTime()

FText AsTimeZoneTime_DateTime ( FDateTime InDateTime,
FString InTimeZone = "" )

Converts a passed in date & time to a text, formatted as a time using the given timezone (default is the local timezone). This will convert the given date & time from UTC to the given timezone (taking into account DST).

◆ Conv_BoolToText()

FText Conv_BoolToText ( bool InBool)

Converts a boolean value to formatted text, either 'true' or 'false'.

◆ Conv_ByteToText()

FText Conv_ByteToText ( uint8 Value)

Converts a byte value to formatted text.

◆ Conv_ColorToText()

FText Conv_ColorToText ( FLinearColor InColor)

Converts a linear color value to localized formatted text, in the form '(R=,G=,B=,A=)'.

◆ Conv_DoubleToText()

FText Conv_DoubleToText ( float Value,
ERoundingMode RoundingMode,
bool bAlwaysSign = false,
bool bUseGrouping = true,
int MinimumIntegralDigits = 1,
int MaximumIntegralDigits = 324,
int MinimumFractionalDigits = 0,
int MaximumFractionalDigits = 3 )

Converts a passed in double to text based on formatting options.

◆ Conv_Int64ToText()

FText Conv_Int64ToText ( int64 Value,
bool bAlwaysSign = false,
bool bUseGrouping = true,
int MinimumIntegralDigits = 1,
int MaximumIntegralDigits = 324 )

Converts a passed in integer to text based on formatting options.

◆ Conv_IntToText()

FText Conv_IntToText ( int Value,
bool bAlwaysSign = false,
bool bUseGrouping = true,
int MinimumIntegralDigits = 1,
int MaximumIntegralDigits = 324 )

Converts a passed in integer to text based on formatting options.

◆ Conv_NameToText()

FText Conv_NameToText ( FName InName)

Converts Name to culture invariant text.

◆ Conv_ObjectToText()

FText Conv_ObjectToText ( UObject InObj)

Converts a UObject value to culture invariant text by calling the object's GetName method.

◆ Conv_RotatorToText()

FText Conv_RotatorToText ( FRotator InRot)

Converts a rotator value to localized formatted text, in the form 'P= Y= R='.

◆ Conv_StringToText()

FText Conv_StringToText ( FString InString)

Converts string to culture invariant text. Use 'Make Literal Text' to create localizable text, or 'Format' if concatenating localized text.

◆ Conv_TextToString()

FString Conv_TextToString ( FText InText)

Converts localizable text to the string.

◆ Conv_TransformToText()

FText Conv_TransformToText ( FTransform InTrans)

Converts a transform value to localized formatted text, in the form 'Translation: X= Y= Z= Rotation: P= Y= R= Scale: X= Y= Z='.

◆ Conv_Vector2dToText()

FText Conv_Vector2dToText ( FVector2D InVec)

Converts a vector2d value to localized formatted text, in the form 'X= Y='.

◆ Conv_VectorToText()

FText Conv_VectorToText ( FVector InVec)

Converts a vector value to localized formatted text, in the form 'X= Y= Z='.

◆ EqualEqual_IgnoreCase_TextText()

bool EqualEqual_IgnoreCase_TextText ( FText A,
FText B )

Returns true if A and B are linguistically equal (A == B), ignoring case.

◆ EqualEqual_TextText()

bool EqualEqual_TextText ( FText A,
FText B )

Returns true if A and B are linguistically equal (A == B).

◆ FindTextInLocalizationTable()

bool FindTextInLocalizationTable ( FString Namespace,
FString Key,
FText & OutText,
FString SourceString = "" )

Attempts to find existing Text using the representation found in the loc tables for the specified namespace and key.

Parameters
NamespaceThe namespace of the text to find (if any).
KeyThe key of the text to find.
SourceStringIf set (not empty) then the found text must also have been created from this source string.

◆ GetEmptyText()

FText GetEmptyText ( )

Returns an empty piece of text.

◆ GetTextId()

bool GetTextId ( FText Text,
FString & OutNamespace,
FString & OutKey )

Attempts to get the ID (namespace and key) used by the given text.

Returns
True if the namespace (which may be empty) and key were found, false otherwise.

◆ GetTextSourceString()

FString GetTextSourceString ( FText Text)

Get the (non-localized) source string of the given text. Note: For a generated text (eg, the result of a Format), this will deep build the source string as if the generation had run for the native language.

◆ IsPolyglotDataValid()

void IsPolyglotDataValid ( FPolyglotTextData PolyglotData,
bool & IsValid,
FText & ErrorMessage )

Check whether the given polyglot data is valid.

Returns
True if the polyglot data is valid, false otherwise. ErrorMessage will be filled in if the the data is invalid.

◆ MakeInvariantText()

FText MakeInvariantText ( FString InString)

Converts string to culture invariant text. Use 'Make Literal Text' to create localizable text, or 'Format' if concatenating localized text.

◆ NotEqual_IgnoreCase_TextText()

bool NotEqual_IgnoreCase_TextText ( FText A,
FText B )

Returns true if A and B are linguistically not equal (A != B), ignoring case.

◆ NotEqual_TextText()

bool NotEqual_TextText ( FText A,
FText B )

Returns true if A and B are linguistically not equal (A != B).

◆ PolyglotDataToText()

FText PolyglotDataToText ( FPolyglotTextData PolyglotData)

Get the text instance created from this polyglot data.

Returns
The text instance, or an empty text if the data is invalid.

◆ StringTableIdAndKeyFromText()

bool StringTableIdAndKeyFromText ( FText Text,
FName & OutTableId,
FString & OutKey )

Attempts to get the String Table ID and key used by the given text.

Returns
True if the String Table ID and key were found, false otherwise.

◆ TextFromStringTable()

FText TextFromStringTable ( const FName TableId,
FString Key )

Attempts to create a text instance from a string table ID and key. Note: This exists to allow programmatic look-up of a string table entry from dynamic content - you should favor setting your string table reference on a text property or pin wherever possible as it is significantly more robust (see "Make Literal Text").

Returns
The found text, or a dummy text if the entry could not be found.

◆ TextIsCultureInvariant()

bool TextIsCultureInvariant ( FText InText)

Returns true if text is culture invariant.

◆ TextIsEmpty()

bool TextIsEmpty ( FText InText)

Returns true if text is empty.

◆ TextIsFromStringTable()

bool TextIsFromStringTable ( FText Text)

Returns true if the given text is referencing a string table.

◆ TextIsTransient()

bool TextIsTransient ( FText InText)

Returns true if text is transient.

◆ TextToLower()

FText TextToLower ( FText InText)

Transforms the text to lowercase in a culture correct way. Note: The returned instance is linked to the original and will be rebuilt if the active culture is changed.

◆ TextToUpper()

FText TextToUpper ( FText InText)

Transforms the text to uppercase in a culture correct way. Note: The returned instance is linked to the original and will be rebuilt if the active culture is changed.

◆ TextTrimPreceding()

FText TextTrimPreceding ( FText InText)

Removes whitespace characters from the front of the text.

◆ TextTrimPrecedingAndTrailing()

FText TextTrimPrecedingAndTrailing ( FText InText)

Removes whitespace characters from the front and end of the text.

◆ TextTrimTrailing()

FText TextTrimTrailing ( FText InText)

Removes trailing whitespace characters.

Variable Documentation

◆ EmptyText

const FText EmptyText