The body classes Lango7 adds

Free4 min read

All guides

Lango7 adds two classes to <body> so you can target a language in CSS or JavaScript.

The classes

  • lango7-lang-{code}: on every page. Your original pages get your site’s code, for example lango7-lang-en.
  • lango7-translated: only on translated pages.
<body class="... lango7-lang-de lango7-translated">

Finding a language’s code

Open the language in Translate → Settings to see its code. It can differ from the folder: /cn/ can use zh-Hans.

For examples, see How to style each language.