Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client had a different font on his translation than his original content.

Solution:
The issue here was related to Cross-Origin Resource Sharing because the client configured the languages to be on different domain names.
Adding the code from the link below in the htaccess allow to get the font from a different domain.

Relevant Documentation:
https://wpml.org/forums/topic/wrong-font-in-english-translation/#post-10760465

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 2 voices.

Last updated by staffanS-2 2 years, 9 months ago.

Assisted by: Nicolas V..

Author Posts
March 9, 2022 at 5:09 pm #10752493

staffanS-2

I am trying to: translate from Swedish to English

Link to a page where the issue can be seen: hidden link

I expected to see: same font as on hidden link

Instead, I got: some other font.

March 10, 2022 at 2:48 pm #10760465

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hello,

Welcome to the WPML support forum. My name is Nicolas and I will be happy to help you today.

I visited your website and I could see CORS errors in the console (see screenshot). CORS stands for Cross-Origin Resource Sharing, basically you're trying to access a ressource on your .se domain from your .eu domain.

Could you please try to add the following to your htaccess file:

# fix CORS error for fonts
<FilesMatch ".(eot|otf|ttf|woff|woff2)">
    Header always set Access-Control-Allow-Origin "*"
</FilesMatch>

Nico

Screenshot 2022-03-10 094532.jpg