# \[Solved\] Using FText::Format with TexBlock Text from StringTable

**URL:** <https://forums.unrealengine.com/t/solved-using-ftext-format-with-texblock-text-from-stringtable/145326>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [June 8, 2020, 2:45am UTC](https://forums.unrealengine.com/t/solved-using-ftext-format-with-texblock-text-from-stringtable/145326 "2020-06-08T02:45:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SolidSk](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/solidsk/32/1194513_2.png) [@SolidSk](https://forums.unrealengine.com/u/SolidSk)\
**Post date:** [June 8, 2020, 2:45am UTC](https://forums.unrealengine.com/t/solved-using-ftext-format-with-texblock-text-from-stringtable/145326/1 "2020-06-08T02:45:43Z")

</div>

Hi!  
How could I use FText::Format to change TextBlock Text value? Its value is from StringTable.

What’s happening:  
1 - I’m using StringTable because of localization, one value stored is: “{0} Health”.  
2 - TextBlock Text is using “{0} Health” in Blueprint “Referenced Text”.  
3 - How could I use FText::Format to change the placeholder?

Thank you!

---

<div class="post-metadata">

**Author:** ![benui](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/benui/32/1145446_2.png) [@benui](https://forums.unrealengine.com/u/benui)\
**Post date:** [June 8, 2020, 5:10am UTC](https://forums.unrealengine.com/t/solved-using-ftext-format-with-texblock-text-from-stringtable/145326/2 "2020-06-08T05:10:49Z")

</div>

From my page on [localizing UIs in Unreal](http://benhumphreys.ca/unreal/ui-localization/#do-use-formattext), you can use FFormatNamedArgs and pass that into FText::Format:

```auto

int32 Value = 150;

FText FormatInput = FText::FromStringTable("MyTable", "HealthFormat");

FFormatNamedArguments Args;
Args.Add("HealthValue", Value);
FText FormattedText = FText::Format( FormatInput, Args );

```

---

<div class="post-metadata">

**Author:** ![SolidSk](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/solidsk/32/1194513_2.png) [@SolidSk](https://forums.unrealengine.com/u/SolidSk)\
**Post date:** [June 8, 2020, 5:26am UTC](https://forums.unrealengine.com/t/solved-using-ftext-format-with-texblock-text-from-stringtable/145326/3 "2020-06-08T05:26:57Z")

</div>

Thank you @benhumphreys !  
I’ve been reading your articles for some time, it was reading your site that I learned the UserWidget/Localization in C++ and best pratices!  
I have an open tab to read your new article **Choosing a minimum resolution**.  
Once again, thank you very much!
