Multi language Messages

  • Hi all!


    I'm working now with KRC4 and using the MsgLib.src and I find it really helpfully toll.

    But now I want to ask you how can I write my messages in two different languages? to be able to translate the messages that would appear to the log and to the teach pendant corresponding to the selected language in the teach Pendant?

    for example, if the operator selected the English language, the message will be shown ( that is my message). If he selected the German language, the message will be shown (Das ist meine Nachricht).

    Of course, I have to write for each message two texts for both languages but I need more details to do that.



    Thank you all in advance!


    BR

    Henry

  • You have to create a krx file containing your messages.

    There are two options:

    - one kxr file for each language

    --dummy.en.kxr (for english messages)

    <uiText key="ShowMyMessage">

    <text>that is my message</text>


    --dummy.de.kxr

    <uiText key="ShowMyMessage">

    <text>Das ist meine Nachrich</text


    -one kxr file holding both languages

    -- dummy.kxr (holding both languages)

    <uiText key="ShowMyMessage">

    <text xml:lang="de-DEV">Das ist meine Nachricht</text>

    <text xml:lang="en-DEV">that is my message</text>

    </uiText>


    In the data folder you have enough examples


    In your message instead of writing "Das ist meine Nachricht" you would write "ShowMyMessage"


    That's basically it

  • Contents of dummy.kxr

    <?xml version="1.0" encoding="utf-8"?>

    <resources xmlns="http://www.kuka.com/schemas/kxr/2009">

    <module name="Dummy">

    <uiText key="ShowMyMessage">

    <text xml:lang="de-DEV">Das ist meine Nachricht</text>

    <text xml:lang="en-DEV">that is my message</text>

    </uiText>

    </module>

    </resources>


    Call

    MsgNotify("ShowMyMessage", "DUMMY")


    Question

    How does your example looks like

  • Hello

    Tried to do this with your example, but it didn't work

    The notify message goes with ShowMyMessage text, Not with the contents of the created DUMMY.kxr file...

    My KSS version is 8.5.8, but I don't think the problem is the version


    OK, my bad. Do not forget to reboot the controller and reload files:hammer1:

Advertising from our partners