One use case that pops up from time to time has been building text in code from bits and pieces. Smart strings can handle some cases, but sometimes it’s just easier to use StringBuilder. Would it be possible to have a convenient and efficient way of getting a translation when the assets are guaranteed to exist (i.e. preloading has been completed), or some documentation on how to achieve that?
As far as I understand, this is the closest way to do it at the moment:
private LocalizedString _helper;
public string GetText(string key)
{
if (string.IsNullOrEmpty(key)) return null;
if (_helper == null) _helper = new LocalizedString();
_helper.TableReference = "Strings";
_helper.TableEntryReference = key;
return _helper.GetLocalizedString().Result;
}
Other than that, I’m happy to see that the feature set of this package is looking good, at least when export/import gets implemented.