Skip to content Skip to sidebar

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 3 replies, has 1 voice.

Last updated by Itamar 1 week, 3 days ago.

Assisted by: Itamar.

Author Posts
August 5, 2025 at 1:48 pm #17296801

Todd

Background of the issue:
I need to globally set a different font for the Hebrew site at hidden link. We're going to use 'Open Sans' instead of 'DM Sans' for the Hebrew site. I've tried setting this in our rtl.css file (just created new), but it's not working.

Symptoms:
The font change to 'Open Sans' for the Hebrew site is not working despite updating the rtl.css file.

Questions:
How can I globally set 'Open Sans' as the font for the Hebrew site?
Why is the font change not taking effect after updating the rtl.css file?

August 6, 2025 at 11:03 am #17299197

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

Thanks for contacting us.

While you wait for my colleague to take over the ticket, let me try to help you with the issue quickly.

We recommend using CSS code to apply different fonts for each translation. Here is an example of how to do it:

html[lang="ar"] {font-family: "Cyrillic Barlow Condensed Reg" !important; font-size: 20px !important; font-weight: 600 !important;}

This code is just an example and depending on the design of your site, you will need to apply CSS code and adjust the values for language code and font you wish to use.

For example, if you want to target all paragraphs on the site, you would include the tag as follows:

html[lang="ar"] p{font-family: "Hoverla Font ENG" !important; font-size: 24px !important;}

The code needs to be added in the Appearance > Customizer > Custom CSS area.

Please note that custom CSS is outside the scope of our Support guidelines, but we still wanted to share with you some examples that you can follow.

Regards,
Drazen

August 8, 2025 at 10:07 am #17305016

Todd

Hi Drazen

Thanks for your continued support.

This is a good start, but don't we have to first call the font from Google's server? Only after it's called into the site can we then assign it as a css declaration, no?

Thanks,
Todd

August 10, 2025 at 2:02 pm #17307681

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Todd.

The answer to your questions is yes.
However, it is out of the scope of our support forum to explain this.
Please understand it is not a WPML issue.
With a quick search on the internet, you can find many sources on how to use Google web fonts on your site. For example, the guide from their website: hidden link.
Please note that you can use more than one Google font on your site, so there is no problem using the English and Hebrew fonts you want to use.

Regards,
Itamar.