C++ Enums with Localization

I tried to use enumeration in the cpp base class of UI, but I am worried that it cannot be localized… Can I localize the C++ enumeration?

I haven’t noticed that the engine uses direct localization anywhere in it’s enums

You could use NSLOCTEXT in conjunction with namespaces to translate the return value of the enum to a localized string but it would have to be a separate function that takes in the enum as a parameter and returns the localized string for the selected value.

Any use of NSLOCTEXT or LOCTEXT directly in the UMETA for any enum item causes a compile error.

1 Like