UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Internationalization.h File Reference

Go to the source code of this file.

Classes

class  FInternationalization
 
struct  FInternationalization::FCultureStateSnapshot
 

Namespaces

namespace  UE
 
namespace  UE::Private
 
namespace  UE::Private::LocGen
 

Macros

#define LOC_DEFINE_REGION
 
#define LOCTEXT(InKey, InTextLiteral)   FText::AsLocalizable_Advanced_LocText(TEXT(LOCTEXT_NAMESPACE), TEXT(InKey), TEXT(InTextLiteral))
 
#define NSLOCTEXT(InNamespace, InKey, InTextLiteral)   FText::AsLocalizable_Advanced_LocText(TEXT(InNamespace), TEXT(InKey), TEXT(InTextLiteral))
 
#define INVTEXT(InTextLiteral)   FText::AsCultureInvariant(TEXT(InTextLiteral))
 
#define LOCGEN_NUMBER(InNum, InCulture)   FText::AsNumber(InNum, nullptr, 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_NUMBER_CUSTOM(InNum, InOpts, InCulture)   FText::AsNumber(InNum, &FNumberFormattingOptions().InOpts, UE::Private::LocGen::GetCultureByName(TEXT(InCulture)))
 
#define LOCGEN_PERCENT(InNum, InCulture)   FText::AsPercent(InNum, nullptr, 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_PERCENT_CUSTOM(InNum, InOpts, InCulture)   FText::AsPercent(InNum, &FNumberFormattingOptions().InOpts, UE::Private::LocGen::GetCultureByName(TEXT(InCulture)))
 
#define LOCGEN_CURRENCY(InNum, InCurrency, InCulture)   FText::AsCurrencyBase(InNum, TEXT(InCurrency), 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)))
 
#define LOCGEN_DATE_LOCAL(InUnixTime, InDateStyle, InCulture)   FText::AsDate(FDateTime::FromUnixTimestamp(InUnixTime), InDateStyle, 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)))
 
#define LOCGEN_TIME_LOCAL(InUnixTime, InTimeStyle, InCulture)   FText::AsTime(FDateTime::FromUnixTimestamp(InUnixTime), 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)))
 
#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_CUSTOM_UTC(InUnixTime, InPattern, InTimeZone, InCulture)   FText::AsDateTime(FDateTime::FromUnixTimestamp(InUnixTime), TEXT(InPattern), TEXT(InTimeZone), UE::Private::LocGen::GetCultureByName(TEXT(InCulture)))
 
#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_TOUPPER(InText)   (InText).ToUpper()
 
#define LOCGEN_TOLOWER(InText)   (InText).ToLower()
 
#define LOCGEN_FORMAT_ORDERED(InPattern, ...)   FText::FormatOrdered(InPattern, __VA_ARGS__)
 
#define LOCGEN_FORMAT_NAMED(InPattern, ...)   FText::FormatNamed(InPattern, __VA_ARGS__)
 

Functions

FCulturePtr UE::Private::LocGen::GetCultureByName (const TCHAR *InCulture)
 

Macro Definition Documentation

◆ INVTEXT

Creates a culture invariant FText from the given string literal.

◆ LOC_DEFINE_REGION

#define LOC_DEFINE_REGION

◆ LOCGEN_CURRENCY

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.

Parameters
InNumThe number to generate the FText from, specified in the smallest fractional value of the currency being used.
InCurrencyThe currency code (eg, USD, GBP, EUR).
InCultureThe culture code to use, or an empty string to use the active locale.

◆ LOCGEN_DATE_LOCAL

◆ LOCGEN_DATE_UTC

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

Parameters
InUnixTimeThe Unix timestamp to generate the FText from.
InDateStyleThe style to use for the date.
InTimeZoneThe timezone to display the timestamp in.
InCultureThe culture code to use, or an empty string to use the active locale.

◆ LOCGEN_DATETIME_CUSTOM_LOCAL

◆ LOCGEN_DATETIME_CUSTOM_UTC

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.

Parameters
InUnixTimeThe Unix timestamp to generate the FText from.
InPatternThe custom strftime-like pattern for the date/time string (see FDateTime::ToFormattedString).
InTimeZoneThe timezone to display the timestamp in.
InCultureThe culture code to use, or an empty string to use the active locale.

◆ LOCGEN_DATETIME_LOCAL

#define LOCGEN_DATETIME_LOCAL (   InUnixTime,
  InDateStyle,
  InTimeStyle,
  InCulture 
)    FText::AsDateTime(FDateTime::FromUnixTimestamp(InUnixTime), InDateStyle, InTimeStyle, FText::GetInvariantTimeZone(), UE::Private::LocGen::GetCultureByName(TEXT(InCulture)))

◆ LOCGEN_DATETIME_UTC

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

Parameters
InUnixTimeThe Unix timestamp to generate the FText from.
InDateStyleThe style to use for the date.
InTimeStyleThe style to use for the time.
InTimeZoneThe timezone to display the timestamp in.
InCultureThe culture code to use, or an empty string to use the active locale.

◆ LOCGEN_FORMAT_NAMED

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

◆ LOCGEN_FORMAT_ORDERED

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

◆ LOCGEN_NUMBER

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.

Parameters
InNumThe number to generate the FText from.
InCultureThe culture code to use, or an empty string to use the active locale.
InOptsCustom formatting options specified as chained setter functions of FNumberFormattingOptions (eg, SetAlwaysSign(true).SetUseGrouping(false)).

◆ LOCGEN_NUMBER_CUSTOM

◆ LOCGEN_NUMBER_GROUPED

◆ LOCGEN_NUMBER_UNGROUPED

◆ LOCGEN_PERCENT

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.

Parameters
InNumThe number to generate the FText from.
InCultureThe culture code to use, or an empty string to use the active locale.
InOptsCustom formatting options specified as chained setter functions of FNumberFormattingOptions (eg, SetAlwaysSign(true).SetUseGrouping(false)).

◆ LOCGEN_PERCENT_CUSTOM

◆ LOCGEN_PERCENT_GROUPED

◆ LOCGEN_PERCENT_UNGROUPED

◆ LOCGEN_TIME_LOCAL

◆ LOCGEN_TIME_UTC

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

Parameters
InUnixTimeThe Unix timestamp to generate the FText from.
InTimeStyleThe style to use for the time.
InTimeZoneThe timezone to display the timestamp in.
InCultureThe culture code to use, or an empty string to use the active locale.

◆ LOCGEN_TOLOWER

#define LOCGEN_TOLOWER (   InText)    (InText).ToLower()

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.

◆ LOCGEN_TOUPPER

#define LOCGEN_TOUPPER (   InText)    (InText).ToUpper()

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.

◆ LOCTEXT

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.

◆ NSLOCTEXT

Creates an FText. All parameters must be string literals. All literals will be passed through the localization system.