Translating chat messages from server plugin

Discussion in 'Plugins' started by rigodon, Jun 9, 2020.

  1. rigodon

    rigodon Registered

    Joined:
    Dec 26, 2012
    Messages:
    218
    Likes Received:
    15
    Hi All, in theory chat messages sent from a plugin are translatable:

    struct MessageInfoV01
    {
    char mText[128]; // message to display

    unsigned char mDestination; // 0 = message center, 1 = chat (can be used for multiplayer chat commands)
    unsigned char mTranslate; // 0 = do not attempt to translate, 1 = attempt to translate

    unsigned char mExpansion[126]; // for future use (possibly what color, what font, and seconds to display)
    };

    I created a new entry in the appropriate message file. If I try destination=0 then nothing appears, regardless the translation thing. If I try destination=1, then message it's shown, but translation is not working. I tried with the text "[Server]: " in front, I tried without it, no difference. Of course, the mTranslate variable is set to 1.

    Does any of you have any experience with this? Thanks in advance.
     

Share This Page