Hi, Amit here, I am the WPML Support Manager, our current ticket queue is quite calm and I'd like to encourage you to use our new chat support option

We are working hard to debug and look at every single report

All of the known issues are documented in https://wpml.org/known-issues/ you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

We are also adding once a week a tutorial to our YouTube channel - https://www.youtube.com/c/WPML-multilingual - check out if we already covered what you need and leave us a comment if you want us to produce anything there

If you do need to open a ticket please make sure to provide us with all the needed information as described here https://wpml.org/faq/checklist-before-opening-a-ticket-in-wpml-support/

We are very proud at our level of support, we are one team from all over the world and we are all experienced WordPress developers, you can read more about us here - https://wpml.org/forums/supporters/

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 2 replies, has 3 voices.

Last updated by Harshad 6 years, 9 months ago.

Assigned support staff: Harshad.

Author Posts
April 2, 2012 at 4:44 pm #54361


Hi - To customize the CSS for different language fonts I need to target the page's content for the different languages.

How can I add a class to the body tag when viewing different languages? I'm willing to add some php to the template files if it's not built into the admin already.

...dutch, spanish, english, ...whatever


April 2, 2012 at 4:51 pm #54363


For example, <body class="body-lang-<?php echo ICL_LANGUAGE_CODE; ?>">

then you should have something like this for Spanish language:
.body-lang-es #content { }

for English language:
.body-lang-en #content { }

April 3, 2012 at 6:03 am #54398



What Dominykas provided you the code, you can try it.

The topic ‘[Closed] How to add class to body tag = Language’ is closed to new replies.