Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Placeholder and language switching

2023-02-28
2023-02-28
  • automatisme - 2023-02-28

    Good morning,

    How to manage language switching with placeholders? Let's say, I plan to pass a text to a button ("Turn off", for instance), through a variable linked to a placeholder %s; how to make this text be translated at the same time as the rest of the display in case of a language change? I have the impression that we should be able to link a list of text to the variable or something like that, but I really don't see how to do it.

    Can anyone help me?

     
  • dkugler - 2023-02-28

    create a textlist with your needed and translated texts.
    Using the function DynamicTextGetText from the lib CmpDynamicText you should be able to "feed" your string variable with the translated texts. The function needs a pointer to the textlist and the index of the text in the list as input. Good luck!

     

    Last edit: dkugler 2023-02-28

Log in to post a comment.