Hi im using polylang for RTL (Persian) website to add English language, so i have to use English font as well
I duplicate my main theme style and add English font to use it for the second language pages
But it applied to both languages and my fonts just messed up
Decide which language is the default one, let’s say Persian.
Choose the default font for the default language from the theme settings, (e.g. Vazir font for Persian).
If you don’t have a child theme, find a way to write some CSS that applies globally.
If you have a child theme, target the classes you want to apply the font-family on it with the language attribute like this: html[lang="en"] h1 { font-family: Montserrat, sans-serif; }
I’ve designed an entire RTL/LTR website, targeting each element I need using the same method above.
But I’ve never used more than one font for both languages.
P.S. If got time, I’ll try to test it by using a font for each language.
I think the simplest option is the one mentioned by Hassan and Kareem. Assigning different theme styles should also work, but you would have to assign each individual page and exclude it in the other theme style, which quickly ends in chaos.
Alternatively to the suggestions above, you can also keep it more general, as the language is output in the HTML tag. Example for German: