Page 2 of 2

Re: multilang

Posted: Tue Apr 02, 2013 2:45 pm
by Cresceus
There is already existing multi-language system for system messages even for npc strings.
Just noone uses it yet
Really? I asked here whether it is implemented or not and if yes how i can set it on but the answer was, that system messages are in client.

So how to set up the whole range of this grand multilang-sys?

I would be very thankful for any explanation.

How to set up multilang for htmls and quests is clear. but what about sys-messages and npc-strings?

Thank you in advance

Re: multilang

Posted: Tue Apr 02, 2013 5:21 pm
by Hyrelius
As far as I've seen, UnAfraid, that system does not seem to work - at least not for system messages and while many said system messages are client-side .. well.. I'm not sure about that, because I've played on a server where they were in a different language, yet my client was not patched in any way.

Re: multilang

Posted: Tue Apr 02, 2013 5:59 pm
by Zoey76
Hyrelius wrote:As far as I've seen, UnAfraid, that system does not seem to work - at least not for system messages and while many said system messages are client-side .. well.. I'm not sure about that, because I've played on a server where they were in a different language, yet my client was not patched in any way.
System messages are hardcoded in client, there is no doubt about that.

There is one system message that it's a wildcard, a single variable slot where you can put any text you want.
We use it to display custom system messages.

The way you have to customize system messages it's to replicate the system messages translated, and acomodate them into XML file (there are some examples), that way if player set it's language (prior lang mod enabling) server will replace the system message Id with the custom translated text.

Re: multilang

Posted: Tue Apr 02, 2013 6:46 pm
by Hyrelius
Thanks for replying, Zoey76, but this is pretty much exactly the same thing I've tried. I'll try it once more though.. I wasn't able to translate any system messages - regardless of whether I've picked one language or another. Do I have to do anything besides translating the xml-file and placing it in the correct folder? (by the way: there are the folders "ger" and "en"; the former though should NOT work, because it's not "de" as it's supposed to be according to the readme file).

I'll definitely have a second look at it, but if anyone has a working example and can tell me what precisely will be localized - please go ahead :).

Re: multilang

Posted: Wed Jun 05, 2013 10:47 pm
by Hyrelius
Sorry for the double-post.

I've looked into it, but I still cannot understand a few things. I do understand, that there's nothing I can do about system messages issued from and answered by the client without server communication (without client-modding).

But I'd think, that if there is a way to send more than just IDs to the client when we issue a system message ourselves, the system would do so.

In particular I've tried this:

Code: Select all

            if (text.equalsIgnoreCase("abc")) {                character.sendPacket(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECONDS);            }
I've put this into a char-handler L2Script, that I've made for something else. I also ensured, that "SystemMessageLocalisation.xml" file contains a translation for the system message.
Since the abbreviation of the folder the file is in should be "de" (and not "ger"), I changed that and made sure, that my L2JMods.properties contains this:

Code: Select all

# Enable or disable multilingual support.# Default: FalseMultiLangEnable = True # Default language, if not defined.# Default: enMultiLangDefault = en # List of allowed languages, semicolon separated.# Default: en;ruMultiLangAllowed = en;de # Enable or disable voice command .lang for changing languages on the fly.# Default: TrueMultiLangVoiceCommand = True # Enable or disable multilingual SystemMessages support.# Default: FalseMultiLangSystemMessageEnable = True # List of allowed languages for SystemMessages, semicolon separated.# Default: MultiLangSystemMessageAllowed = en;de # Enable or disable multilingual NpcStrings support.# Default: FalseMultiLangNpcStringEnable = True # List of allowed languages for NpcStrings, semicolon separated.# Default: MultiLangNpcStringAllowed = de;en
Now I'd expect to get a German system message once this system message is issued by the server (like in the code excerpt postet at the beginning). However: the command still arrives in English and I'm not entirely sure of what I'm doing wrong here.

Could anyone help me with this issue perhaps using some examples? I know, that I won't be able to make sure all system messages are displayed in German without client-modding - I don't mind that. I just want to try and translate those, that actually ARE issued by the server and hence could be translated.

Thank you in advance, guys :).