Discord
Login
Community
DARK THEME

EasyTranslator, My first system contribution.

https://microstudio.dev/i/Sharkman1/easytranslator3/

I found this engine today and created this translation system, where translations are manually written by user, and switched through buttons.

Mainly for fixed texts like menus "play," "credits," it would likely need adjustments for dynamic texts like "dialogues" and "text + variable." Anyway, I really like the engine! It's a shame I have my own project in Unity, so I don't have much time to explore other engines ^-^.

Great tool, although it might be easier to use if the language names were strings and the translations were stored as JSON:

assets/translations.json

{
  "en": {
    "hello": "hello",
    "goodbye": "goodbye"
  },
  "es": {
    "hello": "hola",
    "goodbye": "adiĆ³s"
  }
}
translator = object
  ready = false
  
  init = function(lang)
    language = lang
    asset_manager.loadJSON("translations", function(data)
      ready = true
      translations = data
    end)
  end
  
  get = function(id)
    if not ready then
      return "..."
    end
    return translations[language][id]
  end
end

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community