![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include "Containers/Array.h"#include "Containers/UnrealString.h"#include "CoreTypes.h"#include "Delegates/Delegate.h"#include "Internationalization/CulturePointer.h"#include "Internationalization/LocTesting.h"#include "Internationalization/Text.h"#include "Templates/SharedPointer.h"#include "Templates/Tuple.h"#include "Templates/UniqueObj.h"#include "UObject/NameTypes.h"Go to the source code of this file.
Classes | |
| class | FInternationalization |
| struct | FInternationalization::FCultureStateSnapshot |
Namespaces | |
| namespace | UE |
| namespace | UE::Private |
| namespace | UE::Private::LocGen |
Functions | |
| FCulturePtr | UE::Private::LocGen::GetCultureByName (const TCHAR *InCulture) |
| #define INVTEXT | ( | InTextLiteral | ) | FText::AsCultureInvariant(TEXT(InTextLiteral)) |
Creates a culture invariant FText from the given string literal.
| #define LOC_DEFINE_REGION |
| #define LOCGEN_CURRENCY | ( | InNum, | |
| InCurrency, | |||
| InCulture | |||
| ) | FText::AsCurrencyBase(InNum, TEXT(InCurrency), UE::Private::LocGen::GetCultureByName(TEXT(InCulture))) |
Generate an FText representation of the given number as a currency (alias for FText::AsCurrencyBase). This macro exists to allow UHT to parse C++ default FText arguments in UFunctions (as this macro matches the syntax used by FTextStringHelper when exporting/importing stringified FText) and should not be used generally.
| InNum | The number to generate the FText from, specified in the smallest fractional value of the currency being used. |
| InCurrency | The currency code (eg, USD, GBP, EUR). |
| InCulture | The culture code to use, or an empty string to use the active locale. |
| #define LOCGEN_DATE_LOCAL | ( | InUnixTime, | |
| InDateStyle, | |||
| InCulture | |||
| ) | FText::AsDate(FDateTime::FromUnixTimestamp(InUnixTime), InDateStyle, FText::GetInvariantTimeZone(), UE::Private::LocGen::GetCultureByName(TEXT(InCulture))) |
| #define LOCGEN_DATE_UTC | ( | InUnixTime, | |
| InDateStyle, | |||
| InTimeZone, | |||
| InCulture | |||
| ) | FText::AsDate(FDateTime::FromUnixTimestamp(InUnixTime), InDateStyle, TEXT(InTimeZone), UE::Private::LocGen::GetCultureByName(TEXT(InCulture))) |
Generate an FText representation of the given timestamp as a date (alias for FText::AsDate). This macro exists to allow UHT to parse C++ default FText arguments in UFunctions (as this macro matches the syntax used by FTextStringHelper when exporting/importing stringified FText) and should not be used generally.
| InUnixTime | The Unix timestamp to generate the FText from. |
| InDateStyle | The style to use for the date. |
| InTimeZone | The timezone to display the timestamp in. |
| InCulture | The culture code to use, or an empty string to use the active locale. |
| #define LOCGEN_DATETIME_CUSTOM_LOCAL | ( | InUnixTime, | |
| InPattern, | |||
| InCulture | |||
| ) | FText::AsDateTime(FDateTime::FromUnixTimestamp(InUnixTime), TEXT(InPattern), FText::GetInvariantTimeZone(), UE::Private::LocGen::GetCultureByName(TEXT(InCulture))) |
| #define LOCGEN_DATETIME_CUSTOM_UTC | ( | InUnixTime, | |
| InPattern, | |||
| InTimeZone, | |||
| InCulture | |||
| ) | FText::AsDateTime(FDateTime::FromUnixTimestamp(InUnixTime), TEXT(InPattern), TEXT(InTimeZone), UE::Private::LocGen::GetCultureByName(TEXT(InCulture))) |
Generate an FText representation of the given timestamp as a date and time (alias for FText::AsDateTime). This macro exists to allow UHT to parse C++ default FText arguments in UFunctions (as this macro matches the syntax used by FTextStringHelper when exporting/importing stringified FText) and should not be used generally.
| InUnixTime | The Unix timestamp to generate the FText from. |
| InPattern | The custom strftime-like pattern for the date/time string (see FDateTime::ToFormattedString). |
| InTimeZone | The timezone to display the timestamp in. |
| InCulture | The culture code to use, or an empty string to use the active locale. |
| #define LOCGEN_DATETIME_LOCAL | ( | InUnixTime, | |
| InDateStyle, | |||
| InTimeStyle, | |||
| InCulture | |||
| ) | FText::AsDateTime(FDateTime::FromUnixTimestamp(InUnixTime), InDateStyle, InTimeStyle, FText::GetInvariantTimeZone(), UE::Private::LocGen::GetCultureByName(TEXT(InCulture))) |
| #define LOCGEN_DATETIME_UTC | ( | InUnixTime, | |
| InDateStyle, | |||
| InTimeStyle, | |||
| InTimeZone, | |||
| InCulture | |||
| ) | FText::AsDateTime(FDateTime::FromUnixTimestamp(InUnixTime), InDateStyle, InTimeStyle, TEXT(InTimeZone), UE::Private::LocGen::GetCultureByName(TEXT(InCulture))) |
Generate an FText representation of the given timestamp as a date and time (alias for FText::AsDateTime). This macro exists to allow UHT to parse C++ default FText arguments in UFunctions (as this macro matches the syntax used by FTextStringHelper when exporting/importing stringified FText) and should not be used generally.
| InUnixTime | The Unix timestamp to generate the FText from. |
| InDateStyle | The style to use for the date. |
| InTimeStyle | The style to use for the time. |
| InTimeZone | The timezone to display the timestamp in. |
| InCulture | The culture code to use, or an empty string to use the active locale. |
| #define LOCGEN_FORMAT_NAMED | ( | InPattern, | |
| ... | |||
| ) | FText::FormatNamed(InPattern, __VA_ARGS__) |
Generate an FText representation of the given format pattern with the named arguments inserted into it (alias for FText::FormatNamed). This macro exists to allow UHT to parse C++ default FText arguments in UFunctions (as this macro matches the syntax used by FTextStringHelper when exporting/importing stringified FText) and should not be used generally.
| #define LOCGEN_FORMAT_ORDERED | ( | InPattern, | |
| ... | |||
| ) | FText::FormatOrdered(InPattern, __VA_ARGS__) |
Generate an FText representation of the given format pattern with the ordered arguments inserted into it (alias for FText::FormatOrdered). This macro exists to allow UHT to parse C++ default FText arguments in UFunctions (as this macro matches the syntax used by FTextStringHelper when exporting/importing stringified FText) and should not be used generally.
| #define LOCGEN_NUMBER | ( | InNum, | |
| InCulture | |||
| ) | FText::AsNumber(InNum, nullptr, UE::Private::LocGen::GetCultureByName(TEXT(InCulture))) |
Generate an FText representation of the given number (alias for FText::AsNumber). This macro exists to allow UHT to parse C++ default FText arguments in UFunctions (as this macro matches the syntax used by FTextStringHelper when exporting/importing stringified FText) and should not be used generally.
| InNum | The number to generate the FText from. |
| InCulture | The culture code to use, or an empty string to use the active locale. |
| InOpts | Custom formatting options specified as chained setter functions of FNumberFormattingOptions (eg, SetAlwaysSign(true).SetUseGrouping(false)). |
| #define LOCGEN_NUMBER_CUSTOM | ( | InNum, | |
| InOpts, | |||
| InCulture | |||
| ) | FText::AsNumber(InNum, &FNumberFormattingOptions().InOpts, UE::Private::LocGen::GetCultureByName(TEXT(InCulture))) |
| #define LOCGEN_NUMBER_GROUPED | ( | InNum, | |
| InCulture | |||
| ) | FText::AsNumber(InNum, &FNumberFormattingOptions::DefaultWithGrouping(), UE::Private::LocGen::GetCultureByName(TEXT(InCulture))) |
| #define LOCGEN_NUMBER_UNGROUPED | ( | InNum, | |
| InCulture | |||
| ) | FText::AsNumber(InNum, &FNumberFormattingOptions::DefaultNoGrouping(), UE::Private::LocGen::GetCultureByName(TEXT(InCulture))) |
| #define LOCGEN_PERCENT | ( | InNum, | |
| InCulture | |||
| ) | FText::AsPercent(InNum, nullptr, UE::Private::LocGen::GetCultureByName(TEXT(InCulture))) |
Generate an FText representation of the given number as a percentage (alias for FText::AsPercent). This macro exists to allow UHT to parse C++ default FText arguments in UFunctions (as this macro matches the syntax used by FTextStringHelper when exporting/importing stringified FText) and should not be used generally.
| InNum | The number to generate the FText from. |
| InCulture | The culture code to use, or an empty string to use the active locale. |
| InOpts | Custom formatting options specified as chained setter functions of FNumberFormattingOptions (eg, SetAlwaysSign(true).SetUseGrouping(false)). |
| #define LOCGEN_PERCENT_CUSTOM | ( | InNum, | |
| InOpts, | |||
| InCulture | |||
| ) | FText::AsPercent(InNum, &FNumberFormattingOptions().InOpts, UE::Private::LocGen::GetCultureByName(TEXT(InCulture))) |
| #define LOCGEN_PERCENT_GROUPED | ( | InNum, | |
| InCulture | |||
| ) | FText::AsPercent(InNum, &FNumberFormattingOptions::DefaultWithGrouping(), UE::Private::LocGen::GetCultureByName(TEXT(InCulture))) |
| #define LOCGEN_PERCENT_UNGROUPED | ( | InNum, | |
| InCulture | |||
| ) | FText::AsPercent(InNum, &FNumberFormattingOptions::DefaultNoGrouping(), UE::Private::LocGen::GetCultureByName(TEXT(InCulture))) |
| #define LOCGEN_TIME_LOCAL | ( | InUnixTime, | |
| InTimeStyle, | |||
| InCulture | |||
| ) | FText::AsTime(FDateTime::FromUnixTimestamp(InUnixTime), InTimeStyle, FText::GetInvariantTimeZone(), UE::Private::LocGen::GetCultureByName(TEXT(InCulture))) |
| #define LOCGEN_TIME_UTC | ( | InUnixTime, | |
| InTimeStyle, | |||
| InTimeZone, | |||
| InCulture | |||
| ) | FText::AsTime(FDateTime::FromUnixTimestamp(InUnixTime), InTimeStyle, TEXT(InTimeZone), UE::Private::LocGen::GetCultureByName(TEXT(InCulture))) |
Generate an FText representation of the given timestamp as a time (alias for FText::AsTime). This macro exists to allow UHT to parse C++ default FText arguments in UFunctions (as this macro matches the syntax used by FTextStringHelper when exporting/importing stringified FText) and should not be used generally.
| InUnixTime | The Unix timestamp to generate the FText from. |
| InTimeStyle | The style to use for the time. |
| InTimeZone | The timezone to display the timestamp in. |
| InCulture | The culture code to use, or an empty string to use the active locale. |
Generate an FText representation of the given FText when transformed into lower-case (alias for FText::ToLower). This macro exists to allow UHT to parse C++ default FText arguments in UFunctions (as this macro matches the syntax used by FTextStringHelper when exporting/importing stringified FText) and should not be used generally.
Generate an FText representation of the given FText when transformed into upper-case (alias for FText::ToUpper). This macro exists to allow UHT to parse C++ default FText arguments in UFunctions (as this macro matches the syntax used by FTextStringHelper when exporting/importing stringified FText) and should not be used generally.
| #define LOCTEXT | ( | InKey, | |
| InTextLiteral | |||
| ) | FText::AsLocalizable_Advanced_LocText(TEXT(LOCTEXT_NAMESPACE), TEXT(InKey), TEXT(InTextLiteral)) |
The global namespace that must be defined/undefined to wrap uses of the NS-prefixed macros below Creates an FText. All parameters must be string literals. All literals will be passed through the localization system. The global LOCTEXT_NAMESPACE macro must be first set to a string literal to specify this localization key's namespace.
| #define NSLOCTEXT | ( | InNamespace, | |
| InKey, | |||
| InTextLiteral | |||
| ) | FText::AsLocalizable_Advanced_LocText(TEXT(InNamespace), TEXT(InKey), TEXT(InTextLiteral)) |
Creates an FText. All parameters must be string literals. All literals will be passed through the localization system.