RPTools / maptool

Virtual Tabletop for playing roleplaying games with remote players or face to face.
http://rptools.net
GNU Affero General Public License v3.0
782 stars 259 forks source link

Tools for MT Script i18n #1858

Open bubblobill opened 4 years ago

bubblobill commented 4 years ago

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.

melek commented 4 years ago

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:

Merudo commented 4 years ago

Might be related: Translation support for macros/frameworks

bubblobill commented 4 years ago

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