Assume, we want to localize two words, same in English but different in another language.
We are unable to do so because when using
UE4 GatherText will assign our two Keys to one world.
Localization system is unable to handle situation where we have two different translations for TEXT_HELLO and TEXT_WELCOME in another language. It returns first record found in .archive file only.
You’ll need to put the words into different namespaces. This is currently the intended way of dealing with homographs.
Identical text within the same namespace share translations. This is done to reduce translation costs and runtime memory.
So, what is the purpose of keys if they are not identyfing translation uniquely ?
The keys help us maintain a history for a “instance of text”. For example:
was ever changed to…
then because the key remained stable we can show the translators that the only change was that the ! was removed and that their previous translation just needs a small modification.
This is a boon to translators, particularly with long pieces of text, which is magnified as iteration on existing text begins and reduces translation costs as a “review” is a lot cheaper than doing the whole translation again from scratch.