Hi all,
So when setting up Localization (I’m using the Localization Dashboard, which is not in the scope of this question), here is my desired work flow but it appears it does not work this way.
The basic idea that I’d like to operate on (but doesn’t seem the way UE4 works) is to be able to have knowledge of pre-made localization keys (Read – Namespace + Lookup Key) and be able to enter that on a Text Content block of a widget and have the widget do the loc look-up and display the culture specific translation. However, it appears entering text into the Content blocks automatically tells the localization tool that it should make a new key (and NOT using something that already exists).
Create a loc key and gather text with Loc Dashboard (confirm the translation was found and added into the loc files):
Here is an example
NSLOCTEXT(“Game”, “YesTag”, “Yes Plz!”);
Then follow these steps:
- Setup Blueprint Widget with a Text Block
- Set the Text Blocks “Content | Text” to be “YesTag”, Also set the Namespace to be “Game” in the dropdown to the right (Note the KEY, lets call it “GenKey”).
- Run game and watch it not look-up the NSLOCTEXT you created earlier, instead it acts like what you entered in the Text block’s “Content | Text” to be the Source Text for a new translation with namespace = “Game” and key = “GenKey”.
This feels problematic to me from a technical standpoint. I understand how it is easy to instantly create source texts (which could be a valid english translation and you’re done!) from a designer standpoint, but UMG doesn’t provide any means to use existing translations already due to the auto-generation of new loc key’s when entering text.
More importantly (and dangerously), if I change that text in anyway, the KEY value will be re-generated so if a bunch of translations were created for a specific Widget TextBlock and someone accidentally changes that text (and even if they change it back), they’re now effectively unbound because the KEY on that Text Block’s text content changed. This would create a headache for the loc team which could be inadvertently caused even if someone attempts to watch out for this issue and avoid it by changing back to the original text.
In the following - Ignore the binding function, the same result occurs for the FText values. Attached are images - same text, made an “accidental” edit between steps 1 and 2 but reset to the previous text:
So With all this in mind – What is the best practice to effectively use existing localization strings in a manner that doesn’t require me to make tons of very simple binding functions to do localization text look-up? The recommendation I’ve gotten thus far is to accept the workflow and modify the entries that are gathered afterwards and move forward like that. It seems reasonable and still a better solution to lots of binding functions in blueprints. What about the case of key regeneration? Seems like it is simply generating a new GUID everytime.
Also is there an easy way to get re-usability out of repeated strings in your UMG elements with the current way UE4 appears to do things in UMG?
Thanks very much!