SRD Translation Engine: Changing the language on event.

Discussion in 'Javascript/Plugin Support' started by Magusalfador, Apr 10, 2018.

  1. Magusalfador

    Magusalfador Veteran Veteran

    Messages:
    190
    Likes Received:
    31
    First Language:
    English Spanish
    Hi all! Im using http://sumrndm.site/translation-engine/ plug in.

    This plugin allows you to go to the menu and change the language of your game. My question is, can someone help me into figuring out how to change the language via an event? The plug in states that I should be able to do it by the following plugin command: SetTranslation LANGUAGE. (Language = name of language)


    But it doesn't work, I visited SRD website and people say it doesn´t work either, so Im assuming something is missing?

    What Im trying to accomplish here is to run the event BEFORE the title and choose a language, then the game will start with the language chosen.

    Anyway, I hope you can help me.
     
    Last edited: Apr 10, 2018
    #1
  2. NeoFantasy

    NeoFantasy Building Worlds Veteran

    Messages:
    2,168
    Likes Received:
    1,133
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    I don’t know if this helps as I’ve never used this plugin, but going off of what I know in general does it tell you where to put the command? In an event’s comment box , through a script input in the event tab etc? It could be you’re placing it in the wrong place.
     
    #2
  3. Magusalfador

    Magusalfador Veteran Veteran

    Messages:
    190
    Likes Received:
    31
    First Language:
    English Spanish
    Hi! Yeah, it says :
    In order to force the game to use a specific language, the following
    plugin command must be invoked in an event.

    But it does not work. I´ve tried SetTranslation English and SetTranslation "English".

    Now, that plug in command might not even be what im looking for, that plug in command might only force the language for that event. What I need is something that changes the current language on the menu.

    What Im trying to accomplish here is to run the event BEFORE the title and choose a language, then the game will start with the language chosen.
     
    #3
  4. NeoFantasy

    NeoFantasy Building Worlds Veteran

    Messages:
    2,168
    Likes Received:
    1,133
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    You may need a separate plugin to run the event before the title then. (I’m unsure as to whether or not Mv supports that as a feature)

    If others say it doesn’t work than it is likely an issue with the plugin that needs to be resolved by the developer.
     
    #4
  5. Magusalfador

    Magusalfador Veteran Veteran

    Messages:
    190
    Likes Received:
    31
    First Language:
    English Spanish
    Yeah, I already got the plug in that plays event before title now I just need to know if there is a way to change the language from an event. Thanks for your time @NeoFantasy , I will keep trying!
     
    #5
    NeoFantasy likes this.
  6. Lakaroth

    Lakaroth Veteran Veteran

    Messages:
    270
    Likes Received:
    127
    First Language:
    English
    I have the same issue...
    Someone fix it?

    Best
     
    #6
  7. Magusalfador

    Magusalfador Veteran Veteran

    Messages:
    190
    Likes Received:
    31
    First Language:
    English Spanish
    YES! I figured it out. Its quite simple, Just put this script call on an event:
    Code:
    ConfigManager._language = X;
    Where X is a number, indexed. (0 = default languaje, 1 = first language, 2 = second language, and so on)
     
    Last edited: May 3, 2018
    #7
    Eliaquim and Lakaroth like this.
  8. Lunyc

    Lunyc Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    Italian
    Primarily Uses:
    RMMV
    This actually works but doesn't save upon closing the game, when you open it again, the language has reset. Is there a way to fix it?
     
    #8
  9. Magusalfador

    Magusalfador Veteran Veteran

    Messages:
    190
    Likes Received:
    31
    First Language:
    English Spanish
    Hmm...good catch, didnt noticed that. The only thing I can think of is to edit the save and load scene....let me play with that idea and let you know if it worked.

    EDIT
    Ok, it worked. You need to find the Scene_Save on the file rpg_scenes and after line 1640
    add a line with
    Code:
    $gameVariables.setValue(X, ConfigManager._language);
    where X is the variable you want to save which language you are currently using.

    Now, Im using a plug in that launches a common event every time you load a file.:
    https://galvs-scripts.com/2017/01/23/mv-load-common-event/

    There, you add the script:
    Code:
    ConfigManager._language = $gameVariables.value(X);
    And thats it. Now the language you are using will be saved and load properly.
     
    Last edited: Feb 2, 2019
    #9
    Lunyc and Eliaquim like this.
  10. Lunyc

    Lunyc Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    Italian
    Primarily Uses:
    RMMV
    Works perfectly, wish I knew something about coding lol.
    You're a life saver, man! :ywink:
     
    Last edited: Feb 4, 2019
    #10

Share This Page