The first string needs to be a format specifier, you can also include text in this if you need to (just like with printf formatting), so you probably want something like this (the syntax is more like the Python str.format style to support re-ordering for localisation):
FText::Format(NSLOCTEXT("Solus","DayFmt","{0} {1}"), NSLOCTEXT("Solus","Solus","Day"), FText::AsNumber(DayCount)); // takes both as arguments
FText::Format(NSLOCTEXT("Solus","Solus","Day {0}"), FText::AsNumber(DayCount)); // takes just the day number and formats it into the Day string
Oooh wow! I read the whole Ftext class and looked at format and did not think that could mean Concatenate.
#Please Correct Text.h
Your comment to me should be in the code itself!
like so
/*These take a FText as the formatting string,
* which allows for localisation to re-order the arguments if required for
* -Jame Dale Who is Awesome
*/
static FText Format(const FText& Fmt,const FText& v1);
static FText Format(const FText& Fmt,const FText& v1,const FText& v2);
static FText Format(const FText& Fmt,const FText& v1,const FText& v2,const FText& v3);
static FText Format(const FText& Fmt,const FText& v1,const FText& v2,const FText& v3,const FText& v4);
#My Final Code
My final result:
//These take a FText as the formatting string,
// which allows for localisation to re-order the arguments if required for the current language. -Jamie
DayCount = FText::Format(NSLOCTEXT("Solus","Solus","Day "), FText::AsNumber(SaveDetails.DayCount));
Health = FText::Format(NSLOCTEXT("Solus","Solus","HP "), FText::AsNumber(SaveDetails.PlayerHealth));
Is there a way to do this with text variables in blueprint? I’m concerned about localization and the only node I can find to do this converts it to a string (the Append node).
Yes, the “Format Text” node is equivalent to FText::Format. You just put your arguments within { and }, and then they get added as input pins to the node.