The previous posts in the series describe how to use Translations, but gloss over some of the problems that can crop up. The biggest problem of all is the amount of extra work demanded. The
i18n tags needed increase the writing a lot. There’s no easy way around that (you can use some form of Sheet Templating to ease the load, but this usually adds its own complications). Well, there is one – you could use the absolutely phenomenal tool, ACSI, described in the next post.
But whatever method you choose, once you have decided that the effort of adding translations to your sheet, there are still some things to keep in mind.
Table of Contents
Changing Translations After Creation
When submitting the
translation.json file for the first time, we use the same process as uploading the html and css file – just add them to the sheet folder and upload.
For translations, Roll20 asks that future updates are done through the CrowdIn site. There are instructions here, but they dont seem complete to me.
The best thing you can do in my view, is add translations to a sheet once, all in one go, and never have to worry about this again. But that’s not really practical for sheets undergoing continuous development.
There appears to be a bug with datalists, Read more about this, and a solution using sheet workers, on the wiki page.
We have seen how you can use the getTranslationByKey() function in sheet workers. There are many sheet workers that need to translated value of something. The translation provided is based on the person triggering the sheet worker. So if you have a button that prints to chat, and have a mixed language group, some of tose may see a language they don’t read. But the person triggering the roll will see things n their own language.
If you wnat parts of a sheet to look different one one language to another, you can through CSS. For instance, a sheet with an edition produced in France miht use a different logo in France to everywhere else in the world. Or a word might be too long in German, so you want to adjust the CSS for a section so that word isn’t forced across multiple lines.
There is a class ofrr each language that looks like
.lang-sv. The translation page on the wiki gives a couple of examples of using these language codes. If you know CSS, you’ll know how to handle these.
Setting Case Through CSS
When creating translation keys, we are at the mercy of the transdlator for exactly who something is translated. We might expect upper case and get lower case. Conventional advice is to use a suffix, like -u for upper case (STRENGTH), -l for lower case (strength), -t for title case (Strength).
Scott’s suggestion is to use CSS’s inbuilt method of handling case. Don’t care how translators create worlds, but use CSS classes to enforce the case you want. This means you could get one translation for (say)
Strength, and then present in whatever case you want whereever you want.
The CSS property you need is text-transfform. You could do, for instance:
}Code language: CSS (css)
You can learn more about this over on W3 schools site.
The character sheet translation page at the wiki mentions a potentially very useful tool, ACSI (The Automated Character Sheet Internationalizer). This tool will take a HTML file without translations, and add them. This would be amazing for immedciately adding translations to a system that doesn’t have them.
There are a few complications. It is a very technical tool. First, it’s designed for Linux. Windows 10 and 11 have something called the Linux Subsystem for Windows, which allow you to install any version of Linix in Windows. So if you have Linux or Windows you can use this tool.
The tool works best with character sheets in a certain format. Remove all rolltemplate and sheet worker sections, run the tool, then put those rolltemplayes and sheet workers back in the file. Thiis is not really an arduousb step for anyone capable of using Linux tools!
The final step is the trickiest. Th putput the tool gives might no be exactly what you want. You’ll have to look over the sheet and make sure you have gained the translations you want, and apply changes where necessary. This process might take as much work as just adding the translations from scratch. But it might do exqactoly what you need. The only way to find out is to test it. I’d recommend working on a copy of your original files.
It’s possible the tool might be updated. If so, I’ll make a note of it. but if you want to try it out in the meantime, you can find it on github.
NOTE: I don’t recommend trying ACSI now. By the author’s own words, it is made obsolete by another tool. I’ll cover that in the next translation post.
And there you have it. If you have any extra things to watch out for, please let me know.