# NSLOCTEXT -- or -- FText::FindText ?

**URL:** <https://forums.unrealengine.com/t/nsloctext-or-ftext-findtext/1179341>\
**Category:** C++\
**Tags:** unreal-engine, localization, editor, CPP, Blueprint, question\
**Created:** [May 26, 2023, 2:12pm UTC](https://forums.unrealengine.com/t/nsloctext-or-ftext-findtext/1179341 "2023-05-26T14:12:55Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [May 26, 2023, 3:17pm UTC](https://forums.unrealengine.com/t/nsloctext-or-ftext-findtext/1179341/3 "2023-05-26T15:17:32Z")

</div>

I agree with that 🙂 I’d rather not know what dark magic processes the text property as long as it just works. There is this very specific case for which I need a more dynamic system than the macro in c++, this is a procedurally generated list of input mappings. Whenever a mapping is not present in a string table the log generates an error such as “Action\_Jump” / “Action\_Jump\_Description” / “Axis\_MoveForward” / “Axis\_MoveForward\_Inverse” / “Axis\_MoveForward\_Inverse\_Description” is not present. Here the middle part is the input mapping name taken from the configured mappings and displayed in a procedurally generated list. I wouldn’t want the widget designer to have to add and configure a 100+ keybind environment on just one panel. This leaves me with little option but to figure out how to work with the FText dark magic?

To be clear I do get the right results with FText::FindText usually, sometimes the result is empty. I had to screw around a bit to make sure the string tables are loaded as well. The issues is that sometimes it gives an empty result and I want to make absolutely sure it is not interfering with any “standard way” of localizing in the engine. I have a different issue just from reading text properties which is most likely not related but I need to be sure one does not cause a bug in the engine to the other anyhow. I disabled FText::FindText for now so I can debug if the issue in the post below is unrelated. meanwhile I need to find a solution to be able to localize a dynamic string the correct way in c++

> [[UE5.1.1, Bug report] Widget does not set text unless asset is reloaded. - #13 by Roy\_Wierer.Seda145](https://forums.unrealengine.com/t/ue5-1-1-bug-report-widget-does-not-set-text-unless-asset-is-reloaded/874567/13)

I’m going to test a bit with NSLOCTEXT on that input system because that doesn’t require the namespace variable of that more generic localize utility i showed anyway. Still curious if FText::FindText is any good at all. I rather be able to store my namespaces in a static constant like “UCoreUtils::LocaleNSHID” than writing it all over the place.

---

_[View the full topic](https://forums.unrealengine.com/t/nsloctext-or-ftext-findtext/1179341)._
