maptool icon indicating copy to clipboard operation
maptool copied to clipboard

Tools for MT Script i18n

Open bubblobill opened this issue 4 years ago • 3 comments

Is your feature request related to a problem? Please describe. Internationalisation/Localisation can be a pain. I believe BoT has incorporated some, and I just altered my smart doors to allow it. Don't know how Wolph did his but chances are it's different to the way I did it. It would be nice if there were some MT Script functions available that enabled people to do this.

Describe the solution you'd like A defined i18n data structure and possibly a reserved property name to store it in. I used a straightforward JSON object. {"en-au": {"stringKey1":"stringValue1", "stringKey2":"stringValue2"}, "en-uk": {}, "en-us":{} etc. } Functions like i18n.getLocale() that returns the locale for the campaign/server/client, and i18n.getText(stringKey) that returns the value based on the current or default locale. and possibly a simple translation editor people could use to add translations.

Additional context This might (or might not) help give user content a broader reach across the globe.

bubblobill avatar May 16 '20 16:05 bubblobill

Love this idea, and love the work on the smart doors exploring it. Here are my ideas that I'd like to add to the pot:

  • String Parameters. I'd love to see string parameters supported (e.g. :name uses their weapon)
  • Shorthand function In additional to a long function name, a short alias for the string retrieval function would make it convenient to use. In PHP, I use the double underscore function, __( _messageKey_ ).
  • Crowdsourced default strings. It would be great to have some default translations available. There is an indie game dev polyglot project with thousands of public strings.
  • Campaign level storage. I think translations should be campaign-wide, probably using campaign notebooks (#1665). Additional translation strings could be created/updated with macros.

melek avatar May 17 '20 19:05 melek

Might be related: Translation support for macros/frameworks

Merudo avatar May 24 '20 22:05 Merudo

No. Translation support for macros/frameworks is related to this.

bubblobill avatar Jun 02 '20 09:06 bubblobill