Page 1 of 1
pui.getLanguageText
Posted: Fri Jul 15, 2016 9:37 am
by mbconsul
Where can I find the documentation for this API? I would like to be able to change the default text in the PUISCREENS display file where this command is used.
Example the header text for EOJScreen is "Script: pui.getLanguageText("runtimeText","pui")
How does "pui" translate to "Profound UI" which is the display
Re: pui.getLanguageText
Posted: Fri Jul 15, 2016 10:00 am
by Scott Klement
It looks up a string in a language dictionary. To understand that, you'll first need to understand this:
http://www.profoundlogic.com/docs/displ ... ge+Support
For example, let's say I wanted to put the word "Welcome" on the screen, but I wanted to show it in the user's language. I might make strings like this:
Code: Select all
pui["myDict"]["en_US"]["welcome"] = "Welcome";
pui["myDict"]["fr_FR"]["welcome"] = "Bienvenue";
pui["myDict"]["de_DE"]["welcome"] = "Willkommen";
So when I retrieve the string for "welcome", from the dictionary named "myDict", I want it to give me the right string for English, French or German, depending on which language the user is configured for. To do that, my application would run:
Code: Select all
myString = pui.getLanguageText("myDict", "welcome");
myString would now be set to the proper string based on the language that has been configured.