Untranslated strings should not return as null or empty - suggestion
I'm a fan of _t() returning the untranslated string (rather than null or empty) if a suitable translation is not found. The reason being: Untranslated strings are easy to spot and (hopefully) fix. But when null/empty is returned, it's not always apparent that a translation was missed.
Comments
Log in or create an account to post a comment.
Re: Untranslated strings should not return as null or empty - suggestion
If there is a English message set, it will return the English version, otherwise null.
see
// fall back to Englishin functionThis was not supported until full Unicode support was available.
Re: Untranslated strings should not return as null or empty - suggestion
Interesting...I see that behavior now when I look at the code. I was testing this in a template (along with format_t), and I was getting null values substituted for format_t vars with no translation available. Now I see the untranslated string being returned, as would be expected.