Localization

Discussion in 'JS Plugin Releases (RMMV)' started by DK, May 13, 2018.

    Tags:
  1. DK

    DK Veteran Veteran

    Messages:
    101
    Likes Received:
    91
    Location:
    Russia
    First Language:
    Russian
    Primarily Uses:
    RMMV
    Author: DK

    Version: 4.3.1

    Description: Localization of game

    Requirements and dependencies:
    1. Availability of working plugin DKTools version 8.0.1 or above

    Features:

    1. Unlimited number of languages
    2. Ability to use different images for different languages
    3. Use the tags [t][/t] or {} to localize a text
    4. The text localization is stored in the locales folder
    5. Unlimited number of localization files
    Help:
    ### Special compatibility with other plugins ###
    The plugin is compatible with most other plugins,
    but plugins that do not work with localization can still be included.
    I add the compatibility of these plugins. For compatibility to work properly,
    plugins from the following list must be placed above the localization plugin:
    YEP_QuestJournal.js

    ## Attention! ##
    If you think that any plugin is not compatible with localization, let me know.

    ### Instructions ###

    ### 1 ### Installation ###
    1. Add at least one language in the "Game languages" parameter.
    2. If you changed the standard font in the game, you also need to change it in the "Standard Font" parameter.

    ### 2 ### Usage ###
    1. When you first start the game, the plugin will create a folder for translations and json files for each language.
    2. To localize text use the tags: [t][/t] or {} (preferable).
    3. To use a variable inside text use the tag: \VAR[ID],
    where ID is the number of the variable. Use only for depth of translation.

    ### Adding a new translation with an example of an event with a message ###
    1. Create a new event, add a message display.
    2. In the message, write {text} or [t]text[/ t]. Save the event and project.
    3. Open json files for each language.
    4. The first character of the file must be {, and the last one - }.
    These characters can not be deleted. Inside these brackets the translation of the game is written.
    6. Add the following text to one of the files and save it: "text": "Text".
    7. Start the game and the created event.

    ### Important ###
    The encoding in the translation files must be UTF-8 without BOM

    ### Using arrays ###
    Since version 4.2, the plugin supports arrays in json files.
    Such arrays are loaded into the localization data by file name.

    ### Using arrays with the quests.json file as an example ###
    1. The file has the following structure:
    [null, { "name": "Quest 1" }, { "name": "Quest 2" }]
    2. To display the text "Quest 1" in a message, you need to write a tag
    {quests[1].name}
    To access the array, you must first write the file name,
    in which it is stored, then it must be indicated in square brackets
    the element number and the field to be used.

    ### Using different files (audio, images and videos) for each language ###
    ## Attention! ##
    For this function to work on mobile devices and browsers,
    you must set the Nwjs + Stamp file system mode in the DKTools plugin!

    1. Create a new folder in the required folder
    2. Use the desired game locale as the folder name
    3. Move the files to the created folder
    Example:
    You want to use different Loading.png files for different languages
    The main file is located in the "img/system" folder.
    Create a folder "ru" in "img/system" and move there Loading.png for the Russian language.
    For example, for English, the main file from "img/system" will be used,
    and for the Russian language from the "img/system/ru" created by us.
    This function works only with audio, video and images.

    ### Using an unlimited number of translation files ###
    ## Attention! ##
    For this function to work on mobile devices and browsers,
    you must set the Nwjs + Stamp file system mode in the DKTools plugin!
    This instruction is intended for the folder that has a default name (locales)
    If you renamed the folder in the plugin settings, then use the new folder name!

    If you have a large amount of text in the game, and you are not comfortable using one json file,
    then you can split it into several json files and put it in a separate folder.
    Example for English locale (en):
    1. In the locales folder, create an "en" folder.
    2. Transfer your old en.json file from the locales folder to the new folder.
    3. Create several json files with any names.
    4. In each file, write down the required tags and save the changes.
    ## Attention! ##
    All tags in all files must have a unique name!
    If the tag names match, the first one will be loaded (order is not guaranteed)!

    ### 3 ### Plugin parameters ###
    1. Ignored files - Files that are ignored by the UpdateLocalizationTags plugin command.
    2. Parse Depth - The number of text translation operations.
    In the translated text you can specify another tag,
    and it will be translated if the depth of translation is greater than 1.
    Example:
    "text": "Text {text2}",
    "text2" "2"
    With a translation depth of more than 1, the result is "Text 2".
    3. Text Length - The length of the text at which it is saved in the cache.
    This is necessary to reduce the computational resources for translation.
    The cache is automatically cleared when between maps.

    ### 4 ### Message special symbols ###
    1. \language - Display the name of the current language

    ### 5 ### Plugin commands ###
    1. Updates tags in the translation files.
    The plugin command checks json files from "data/"
    except ignored files specified in the plugin parameters
    and also all the parameters of all plugins.
    Found tags are saved in new files in the localization folder with the prefix "new".
    UpdateLocalizationTags

    2. Clears the localization cache.
    ClearLocalizationCache

    I strongly recommend that you try the demo version before asking questions

    Download Demo:
    Demo

    Download: https://dk-plugins.ru/mv/system/localization/
     
    Last edited: Aug 20, 2019
    #1
    Kike, Frogboy, WickedWolfy and 6 others like this.
  2. DK

    DK Veteran Veteran

    Messages:
    101
    Likes Received:
    91
    Location:
    Russia
    First Language:
    Russian
    Primarily Uses:
    RMMV
    Release 2.0
     
    #2
    RyanBram and AestheticGamer like this.
  3. DK

    DK Veteran Veteran

    Messages:
    101
    Likes Received:
    91
    Location:
    Russia
    First Language:
    Russian
    Primarily Uses:
    RMMV
    Version 3.0

    1. Added support for browsers and mobile devices
    2. Added a new option: Using new files to save updated tags
     
    #3
    RyanBram likes this.
  4. DK

    DK Veteran Veteran

    Messages:
    101
    Likes Received:
    91
    Location:
    Russia
    First Language:
    Russian
    Primarily Uses:
    RMMV
    Version 3.1

    1. Added compatibility with DKTools 6.1+
    2. Fixed a bug with DKTools.Localization.addChangeLocaleListener

    Version 3.11
    1. Fixed a bug with loading a locale

    Updated first post and demo.
     
    Last edited: Nov 14, 2018
    #4
  5. Archeia

    Archeia Level 99 Demi-fiend Staff Member Developer

    Messages:
    14,564
    Likes Received:
    14,246
    Location:
    Game Dev Salt Mines
    First Language:
    Filipino
    Primarily Uses:
    VNM
    I really like how it includes the database for translation! The only thing I highly dislike about it is everything is in a single json file. I'm testing out if I can work with it with my own dialogue only localization script. Thanks very much for the high quality plugin :3
     
    #5
  6. DK

    DK Veteran Veteran

    Messages:
    101
    Likes Received:
    91
    Location:
    Russia
    First Language:
    Russian
    Primarily Uses:
    RMMV
    Glad you like the plugin.
    I think that in the next version of the plugin I will add the ability to use an unlimited number of JSON files in the localization folder for one language.
     
    #6
    Archeia likes this.
  7. DK

    DK Veteran Veteran

    Messages:
    101
    Likes Received:
    91
    Location:
    Russia
    First Language:
    Russian
    Primarily Uses:
    RMMV
    Version 4.0

    What's new:
    1. Added the function of splitting the translation into several json files (only for PC).
    2. If the json file has the wrong structure, then the game now does not hang, but gives an error, and shows where it was made.
    3. Removed the setting for using new files to update localization tags. Now new tags are always saves to new files.
    4. "UpdateLocalizationTags" command is out of beta version. Added support for parsing all active plugins. That is, the plugin team pulls tags from the settings of all plugins.
    5. More compatibility with other plugins.
    6. Added 1 special character for messages. Now you can display the name of the current language in the message.
    7. Updated help file.
    8. Updated demo. Added new examples.

    P.S. Please note that the latest version of the plugin requires the latest (currently) version of the DKTools plugin - 7.0.0.
     
    #7
    luzi and bazrat like this.
  8. WickedWolfy

    WickedWolfy Touch Fluffy Tail! Veteran

    Messages:
    106
    Likes Received:
    45
    Location:
    East Coast, USA
    First Language:
    En, De, Ru
    Primarily Uses:
    RMMV
    Have not used the plugin yet, but it looks like the thing I needed.
    Either way, thank you for all your hard work. I will most likely be back with either questions or more praise. ;)
     
    #8
    DK likes this.
  9. DK

    DK Veteran Veteran

    Messages:
    101
    Likes Received:
    91
    Location:
    Russia
    First Language:
    Russian
    Primarily Uses:
    RMMV
    Version 4.1

    What's new:
    1. Added the ability to change the language in the game options.
    2. Added compatibility with the plugin YEP_QuestJournal (more in the updated help).
     
    #9
  10. DK

    DK Veteran Veteran

    Messages:
    101
    Likes Received:
    91
    Location:
    Russia
    First Language:
    Russian
    Primarily Uses:
    RMMV
    Version 4.2

    What's new:
    1. Added support for arrays in JSON files.
    2. Fixed display of game currency.
     
    #10
    bazrat likes this.
  11. DK

    DK Veteran Veteran

    Messages:
    101
    Likes Received:
    91
    Location:
    Russia
    First Language:
    Russian
    Primarily Uses:
    RMMV
    Version 4.3

    What's new:
    The functions "Use different files for each language" and "Use an unlimited number of translation files" can now work in browsers and on mobile devices (you need to select the file system mode "Nwjs + Stamp" in the DKTools plugin).

    The plugin now requires a minimum version of DKTools 8.0.1.

    Also updated demo!
     
    #11
  12. DK

    DK Veteran Veteran

    Messages:
    101
    Likes Received:
    91
    Location:
    Russia
    First Language:
    Russian
    Primarily Uses:
    RMMV
    Version 4.3.1

    Help display bug fixed.
     
    #12

Share This Page