1. Hey! Guest! The 31st GMC Jam will take place between Nov 16th, 12:00 UTC (Friday noon) and Nov 26th, 12:00 UTC (Monday noon). Why not join in! Click here to find out more!
    Dismiss Notice

GMS 2 Advice when it comes to loading text (localization) [SOLVED]

Discussion in 'Programming' started by PlayerOne, Aug 23, 2018.

  1. PlayerOne

    PlayerOne Member

    Joined:
    Mar 14, 2018
    Posts:
    217
    I plan localizing my game and I have two ideas rolling around in my mind on how to load text. Either load the strings from an .ini file into a ds_grid in a centralized way and have the objects access the strings form that grid or load strings in each object when a room starts (or object spawned) in to a object variable.

    Each carry their ups and downs and I was hoping if any one had insight into this subject. Currently, I'm thinking a ds_grid would be faster in a persistent object to access the localized text.
     
  2. 2Dcube

    2Dcube Member

    Joined:
    Jun 23, 2016
    Posts:
    291
    How do you plan to do the translation? Do you have people helping out?
    I use an excel sheet (or Google doc) with the first column being string ids, like "button_ok", "button_cancel" and so on. Then the other columns are each for a different language.
    Other translators can easily help out.

    When it's done I turn a csv file into json with Game Maker, which is a bit more complicated.
    But I guess what I'm saying is, it also depends on how you plan to do translating.

    If it's not much text, a simple ini file might do.
     
  3. AlexDerFerri

    AlexDerFerri Member

    Joined:
    Aug 24, 2017
    Posts:
    25
    Hi!
    I think a good way to do it is to have an included json file that stores all the languages.
    Then when you need to draw any kind of text, you just decode the json file in a temporary ds_map and return the string you need.
    Here's an explanation on how to do it:
    https://alexder.itch.io/json-localization-game-maker-studio
     
    PlayerOne likes this.
  4. PlayerOne

    PlayerOne Member

    Joined:
    Mar 14, 2018
    Posts:
    217
    Welp, I didn't notice this topic had a new reply till I was searching for people to help today. lol

    Wasn't honestly expecting help out of the blue like this and yet this is what I needed. Thank you. You made made my day. :):):):):)
     
    AlexDerFerri likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice