Skip Navigation

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 1 reply, has 2 voices.

Last updated by Andrés 4 years, 10 months ago.

Assigned support staff: Andrés.

Author Posts
August 31, 2016 at 1:52 pm #1046769

Becky

Hi,

I am using WPML for my website with two languages: English and Traditional Chinese.

May I know if it is possible to have different font family for different languages? Seems the traditional css code is not applicable (e.g. p {font-family: "English Font", "Traditional Chinese Font;"} is not working on my website as the "Traditional Chinese Font" will change the English text as well.

Please help. Thanks!

August 31, 2016 at 2:46 pm #1046937

Andrés
Supporter

Languages: English (English ) Spanish (Español ) French (Français )

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

Hello Becky,

Welcome to WPML support forum.

1. If you checked your "Traditional Chinese Font;" without WPML, does it work?

2. You could also think about calling different CSS stylesheets depending on the language with the help of 'wpml_current_language'. Something like:

$my_current_lang = apply_filters( 'wpml_current_language', NULL );
if ( $my_current_lang == 'chinese-code') {
    //enque your chinese.css stylesheet.
} else {
    //enque your style.css stylesheet.
}

WPML API:
https://wpml.org/wpml-hook/wpml_current_language/

2. To help you faster, I've enabled debug information for this support ticket. Please see this link for how to get this information from your site and give it to us:
http://wpml.org/faq/provide-debug-information-faster-support/

Best regards,
Andrés