# \[UE5.1.1, Bug Report\] FText::FindText returns true despite leaving text output empty.

**URL:** <https://forums.unrealengine.com/t/ue5-1-1-bug-report-ftext-findtext-returns-true-despite-leaving-text-output-empty/888232>\
**Category:** Issues and Bug Reporting\
**Tags:** unreal-engine, localization, bug-report, editor, CPP, question\
**Created:** [April 12, 2023, 1:34am UTC](https://forums.unrealengine.com/t/ue5-1-1-bug-report-ftext-findtext-returns-true-despite-leaving-text-output-empty/888232 "2023-04-12T01:34:36Z")\
**Posts on this page:** 1\
**Page:** 1

<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:** [April 12, 2023, 1:34am UTC](https://forums.unrealengine.com/t/ue5-1-1-bug-report-ftext-findtext-returns-true-despite-leaving-text-output-empty/888232/1 "2023-04-12T01:34:36Z")

</div>

I was expecting a warning, or at least FText::FindText returning false if localization failed.  
FindText either returns true on failure or returns true while setting the out text to empty. The issue resolved itself after recompiling my localizations, then I got a non empty value. At the time I had these log messages in place so I’m certain there is an issue with it.

It’s silly that I had to wrap a utility around FText::FindText to make it at least detect a localization failure.

```auto
FText Localized = FText();
if (!FText::FindText(InNameSpace.ToString(), InKey, Localized)) {
	if (bWarnIfFail) {
		CUR_LOG(LogCorePlugin, Warning, "Could not localize text. Namespace: %s, Key: %s.", *InNameSpace.ToString(), *InKey);
	}
}
if (bWarnIfFail && Localized.IsEmptyOrWhitespace()) {
	CUR_LOG(LogCorePlugin, Warning, "Localized text is empty or whitespace. Namespace: %s, Key: %s.", *InNameSpace.ToString(), *InKey);
}

```
