Is there a way to populate the translation terms list in the translation manager window with all translatable terms in a Perspective project? The translation videos show that capability in Vision, but I’m unable to find it in Perspective 8.1.19. Also is there a list of locale abbreviations somewhere? I manually added a couple terms to the translation manager, and I’m able to display the values for all of the languages except simplified Chinese. I tried zh and zh-CN for Chinese. Those didn’t work.
You can find the supported locale abbreviations at Java 11 Supported Locales
zh-CN should have worked for simplified Chinese. I’ll play around with it a bit and see if that’s an oversight.
No built-in way, but I seem to remember @nminchin mentioning he’d made a script for that.
Even if he didn’t mention it, he probably has a script for that anyway. Maybe he’ll be willing to share.
Thanks, Kathy. Let me know if it’s an oversight or if you can get it to work.
It would be great if there is already a script somewhere so we don’t have to manually add every term in our project.
Kathy, do you know if full sentences can be entered in the terms list, or does Ignition work on individual words?
You can put full sentences in there.
It works on exact matches of terms. So if you entered a translation for “red” and the term it’s looking for is “red light”, it won’t match. But your term can be as long as you want, probably limited to 2 billion characters including spaces and punctuation.
We pretty much have to do it this way because so many words are so ambiguous when it comes to translation. Does stop mean halt or does it mean the diameter of a lens (f stop) or does it mean a station (train stop)? Or maybe it’s some acronym specific to your company. We feel it’s much safer to leave that up to you.
Be aware though that apart from those flexibility settings:
it will only translate EXACT matches. So watch the spelling of everything.
Is there a way to use a script to get a list of the locales you have selected in the Translation Manager in Perspective?
Vision has the ability using system.util.getAvailableLocales(). I have my available locale codes and names hard coded in the properties for the dropdown that I’m using to select different languages for the project. I’d like to have a script get the locales and populate the dropdown properties to avoid having someone edit the component properties if we add new languages in the future.