Based on IAVRA's help text in the Localization Core, the following script returns the current language name:
IAVRA.I18N.language;
Therefore, if your language codes in the Iavra localization plugin are 'esp' for Espanol, and 'eng' for English:
If: Script: IAVRA.I18N.language === 'esp'
Text: None, Window, Bottom
: : Spanish
ELSE
Text: None, Window, Bottom
; : English
END
Obviously, I'm using text commands after the check for language. Tested this code, and it worked.
If you have more languages, this will require possibly either cascading IFs or sequential IFs with a GOTO label.
Iavra Localization
● ARCHIVED · READ-ONLY
-
-
Thank you very much for the help. It works like a charm! I love this plugin, it's so handy to have all the text from game in one external file! :ehappy:
-
I feel the stupidest person on the planet since I didn't understand a thing about how it works... After installing, there is an error "unexpected end of input". A tutorial or something like would be really welcome.
-
-
Thank you, tested here and working fine.
For those with problem breaking lines (like I was): \n (single slash) and double for things like \\v[x], \\n, etc.
EDIT
Just to report: there's an issue with YEP Message Core. Item names doesn't show properly, so if I use "\\i[1]", only the icon appears and the escape code (I know it's more like a YEP MC problem).

-
Any way I can put two " symbol together? I have a pic right here.

And I think I've found an issue. If I put the symbol "-" in a key (ex: pop10-d), it will show the key on dialogs instead of the text that you wanted it to show. For example, on the message window, instead of showing "Page 10 - They run around a circle", it'll show "pop10-d" instead. But if I remove "-", everything works fine. Can you help me with this? -
@l3m35 when using YEP_Message Core you need to use \\ii[x] to show the item name & icon, as \\i[x] is the default rpg masker mv code for just showing the icon.
-
Any way I can put two " symbol together? I have a pic right here.
This?
"\"Someone's waiting for you...\"", -
@l3m35 when using YEP_Message Core you need to use \\ii[x] to show the item name & icon, as \\i[x] is the default rpg masker mv code for just showing the icon.
Sorry, typo. That's exactly what I'm using to that result. -
@l3m35 Thank you. But any solution for the second issue?
And I think I've found an issue. If I put the symbol "-" in a key (ex: pop10-d), it will show the key on dialogs instead of the text that you wanted it to show. For example, on the message window, instead of showing "Page 10 - They run around a circle", it'll show "pop10-d" instead. But if I remove "-", everything works fine. Can you help me with this? -
Not sure if the issue you are raising is with the IAVRA Localization or whether the '-' is a reserved JSON delimiter (I doubt it is), but the answer would be to avoid using special characters in the identifiers at any level of the JSON, to make sure it works correctly.@l3m35 Thank you. But any solution for the second issue?
I actually have almost a thousand lines of custom text in my text file, and it's not having any issues, that is, as long as I put the #{item.001n} in the text window, and have
"item": {
"001n": "Heal Tab",
....
"099n": "end marker" }
it works ok.
Note that the tags I am using just use letters and numbers. This may also be the problem @l3m35 is having...
If you ever get an error when launching your game, unexpected token, etc, you can copy the contents of your JSON text file and paste them into the box at the following website: https://jsonlint.com/
I found that site to be unbelievably invaluable in fixing issues like that. -
@Lynvia Nvm, I switched back to the old version of the plugin and it works fine now.
-
No idea about this issue with hyphens, but if there's no special reason to use it, I would go with underscores, instead.
Note that the tags I am using just use letters and numbers. This may also be the problem @l3m35 is having....
No luck for me. I've tried with underscore, only letters, etc. Same thing. -
The demo from sajiki no longer is available... If someone got one i'll be glad. else i will mange it by my own, but i admit it will be quicker with a demo... Nice work anyway
-
How do you translate the menu?
-
The demo from sajiki no longer is available... If someone got one i'll be glad. else i will mange it by my own, but i admit it will be quicker with a demo... Nice work anyway
Check this link: http://download1517.mediafire.com/jjp6p7wxrtyg/51kmm45osc9otui/03.+Project03+v3.4a.zip
It's other post
How do you translate the menu?
I had the same question. You can translate. It's text. You only need to put in System:
#{tname}
Example:
#{text.term01}
#{text.term02}
#{text.term03}
#{text.term04}
#{text.term05}
You can see the demo I posted in this comment. It helps a lot. -
Thank you for your wonderful plugin. I searched for a plugin like yours.
I started my first game and will send you an update for the first test phases.
Of course you're mentioned in my credits. ;)
And I have one question. Is there an option to ask you that privatly or do you insist that I ask the question here?
Greetings
KazutoSensei -
This plugin is fantastic and does everything it says on the tin.
One issue, however, is that loading a save file after closing the game results in the language being reset to default.
For example:
If I'm in the middle of a game, and I've set the language to German, I can save and exit.
When I open the game again later, and load my save file, the language has reverted to English (the default set by the plugin). Ideally, I want to be able to continue playing in German, since I have already selected that from the options.
Is there a way to retain the current language when the game is saved and loaded? -
Only way I can think of would be to keep the current language as a variable, and trigger an event on Load, that would read and set the language after the save file has been loaded up.
-
What's wrong? Its core.js, only add one language and menu label.error
