In Unreal Engine 4.12, FText members expose a menu to set a custom namespace (for localization).
It would seem logical that some Unreal metadata could be added to USTRUCT or UCLASS properties to set the default namespace (instead of appearing blank for new items).
Something similar to this:
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(TextNamespace="my_text_namespace"))
FText TextForTranslation;
Thanks!
All defaults should be in constructor, so try setting namespace there
A constructor would allow a blank FText to be created in a particular namespace - would the namespace be kept if it was modified? I’ll try it now!
What will be in constructor will set up default object, inherent classes add there stuff to that object, and when you modify values it overrides those default values, save data modifies that default data. What is in default object is acknowledged as default values by the engine, it powers those yellow arrows.
That why you should not palce init code in costructor as defualt object should be inactive (not to mention in stage when default object are create is engine is not fully initiated), only default data.
Hi! I also really need the ability to specify namespace to FText. Did You find the answer?
No this wasn’t resolved, but I think from 4.14 an FText will keep its namespace - even after editing (if this helps at all)