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 .
×
Create a free account

Language-specific css on sheets

1595228396

Edited 1595228515
vÍnce
Pro
Sheet Author
<a href="https://roll20.zendesk.com/hc/en-us/articles/360037773493-Character-Sheet-Translation#CharacterSheetTranslation-DesigningYourSheet" rel="nofollow">https://roll20.zendesk.com/hc/en-us/articles/360037773493-Character-Sheet-Translation#CharacterSheetTranslation-DesigningYourSheet</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
1595238664

Edited 1595238794
Andreas J.
Forum Champion
Sheet Author
Translator
Here is a an example from the D&amp;D 5E sheet. <a href="https://github.com/Roll20/roll20-character-sheets/blob/7712d47e3d2c34641d03cc9a2a4d2065a8790196/DD5thEditionLegacy/5th%20Edition%20Legacy.css#L3246" rel="nofollow">https://github.com/Roll20/roll20-character-sheets/blob/7712d47e3d2c34641d03cc9a2a4d2065a8790196/DD5thEditionLegacy/5th%20Edition%20Legacy.css#L3246</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="https://github.com/Roll20/roll20-character-sheets/search?q=.lang&amp;unscoped_q=.lang" rel="nofollow">https://github.com/Roll20/roll20-character-sheets/search?q=.lang&amp;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.
1595278174

Edited 1595278342
vÍnce
Pro
Sheet Author
Thanks for the help Andreas. Search the github repo for ".lang", and you'll find more examples.&nbsp; <a href="https://github.com/Roll20/roll20-character-sheets/search?q=.lang&amp;unscoped_q=.lang" rel="nofollow">https://github.com/Roll20/roll20-character-sheets/search?q=.lang&amp;unscoped_q=.lang</a> great tip!