Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
If you're having issues creating a character, clear your cookies and log in again. If you continue having issues, contact us.
Create a free account

Language-specific css on sheets


Edited 1595228515
Sheet Author
<a href="" rel="nofollow"></a> Since creating one single design that can fit multiple sizes of translated text can be hard, we've added a class to the parent "charsheet" element to let you have separate css for individual languages. The class is "lang-[2 char language code]", so if the language is English "lang-en" or French "lang-fr". This will allow you, after your sheet has been translated, to change a style, specifically for one language, if the new text for that language doesn't fit your current design. Curious if anyone can point out a sheet where this has been done? I would like a show a given logo for a sheet based off of the user's language. Safe to assume I need to include ".sheet-" on the css page? ie .sheet-lang-pt I specifically need to make a change to "pt-br" which is obviously not a normal "[2 char language code]" as mentioned on zendesk/wiki.&nbsp; I'm wondering if using .sheet-lang-pt-br will work?&nbsp; I'm asking since I don't think this can be tested without actually adding the changes and allowing the vtt to make the translation on a live sheet. TIA

Edited 1595238794
Andreas J.
Forum Champion
Sheet Author
Here is a an example from the D&amp;D 5E sheet. <a href="" rel="nofollow"></a> /* Translation Overrides */ /* Spanish */ .lang-es .sheet-spell-container input[name="attr_spellcastingtime"] { width: 115px; } The formula is as mentioned in the documentation, things should start with " .lang-(language-prefix) ", not the normal " .sheet- ". Search the github repo for ".lang", and you'll find more examples. <a href=";unscoped_q=.lang" rel="nofollow">;unscoped_q=.lang</a> I'll see if I might add this stuff to the wiki documentation at some point, don't think language overrides are too well represented there, even if every other piece of character sheet creation documentation on the wiki is superior than the zendesk equivalent. The articles on most other Roll20 stuff is better on zendesk otherwise, but not the relevant docs we're talking about.

Edited 1595278342
Sheet Author
Thanks for the help Andreas. Search the github repo for ".lang", and you'll find more examples.&nbsp; <a href=";unscoped_q=.lang" rel="nofollow">;unscoped_q=.lang</a> great tip!