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 11 replies, has 2 voices.

Last updated by vasilikiK-2 1 year, 10 months ago.

Assisted by: Bobby.

Author Posts
June 4, 2023 at 7:29 pm #13766547

vasilikiK-2

Hello, I have previously contacted you regarding my site hidden link and we have found a solution ( https://wpml.org/forums/topic/replacing-font-in-menu-items/ ) that works fine on desktop but I have a little issue with font replacement. I use the custom css:
h2:lang(el), h3:lang(el), h4:lang(el), h5:lang(el), h6:lang(el) {
font-family: "Times New Roman", Times, serif !important;
}
p:lang(el) { font-family: Tahoma, Geneva, sans-serif !important; }

.redboa-menu-fixed > ul > li > a:lang(el) {
font-family: Tahoma, Geneva, sans-serif !important;
text-transform: none !important;
font-size: 16px !important;
}

but I can't seem to be able to change the default button text in Greek on desktop and on mobile option it uses a font that uses C instead of Greek Σ on android while on IOS it uses a script font that gets messy. How can I force a Geneva or Trebuchet font on mobile options too like on desktop?

Screenshot 2023-06-04 17.50.28.png
Screenshot 2023-06-04 18.03.41.png
Screenshot_20230604-181252_Chrome.jpg
Screenshot_20230604-181240_Chrome.jpg
June 5, 2023 at 5:01 pm #13773803

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

It looks like the button is still using the Pirata font which is not 100% compatible with the Greek language from what I can see.

before I proceed it's important to note that custom work is not supported in our forum (custom work includes custom CSS) and that when it is provided it is at the discretion of the supporter.

The button is using the Pirata font.

You will need to locate the CSS class or id of the button and target it to change it's font-family as you have done with the h2,h3, menu items, etc.

To locate the right class the easiest way without contacting the theme author is to use Chrome browser's inspect tool.

Right-click on the button or any other front-end element -> inspect and then view it's CSS class or id used.
See more info here:
hidden link

In this case, it is .butn

Using the CSS below (make sure to edit to match the font family you want to use, I was able to target the font and change it to Geneva)

.butn{font-family:'Geneva' !important;}

Let me know your results, please.

June 5, 2023 at 8:25 pm #13774489

vasilikiK-2

Thank you so much, I managed to get rid of the comic sans font that was used on buttons on desktop but now I get Noto Sans Elbasan on Android and Times on desktop although I set Geneva font family 😀
I probably should try to contact the theme builders but they couldn't help me at start on how to change fonts in Greek only, this is something Osama helped me manage from your support.

June 5, 2023 at 11:23 pm #13774775

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

When I view it on the mobile phone at the moment I notice that in the Greek version 2 of the buttons are in one font and the other button on another.

What are your results when you review these buttons and their font-family options in Elementor?

June 6, 2023 at 7:10 am #13775443

vasilikiK-2

Hi, well this particular button can't be previewed while building cause it's a slider area widget, while when I tested button widgets it shows up correctly both backend and frontend.
The different fonts you see are 2 in Greek and the word Gallery is in english so it uses the pirata font

June 6, 2023 at 5:57 pm #13780943

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

If I am not mistaken the lang() CSS function uses the HTML markup to figure out the laguagee and would not be able to distinguish between GR and EN words in a Greek page per the HTML

hidden link

If possible, please do contact the theme authors about this and let me know their feedback as this is more of their field of expertise as it's their code and not our plugin's code causing this issue.

In the meantime I will take a look at the backend to see if we are missing something

I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)

**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **

I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.

NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.

Thank you,
Bobby

June 7, 2023 at 6:31 am #13782101

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you for the access details!

I can confirm that the following CSS is what is adding the cursive font.

Please let me know the author's feedback as I have even tried overwritting the deafult CSS using .butn{ font-family: "Times New Roman", Times, serif !important; } but it is not working as expected.

Screen Shot 2023-06-06 at 11.24.12 PM.png
June 8, 2023 at 9:59 am #13791855

vasilikiK-2

Hello Bobby,
this is the answer I got from the theme support :S
"WPML plugin is not part of our theme package.
Your request is customize work and out of support theme.
Also it looks like "gallery" hasn't been filtered through by the plugin. because it received the same css as other items."

I also went to the css files myself and by replacing "cursive" with "sans-serif" wherever I found it next to "Pirata one" managed to get rid of the script-something font in IOS but not the Noto Sans Elbasan font in Android...

June 8, 2023 at 5:26 pm #13794777

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

That is unfortunate as you would have had the same issues with their theme if you were to not using WPML and your site was only developed in Greek.

When communicating with their team I'd possibly avoid mentioning the WPML plugin and custom CSS code instead let them know you have a site in Greek and that the button fonts are doing this. They should be able to clearly point you how and where in their code to change this as this is not caused by WPML.

You can also invite them to join our go global program which helps authors make their theme multi-language read and compatible with WPML
https://wpml.org/documentation/support/go-global-program/

Furthermore, I did do a quick check on a simulator of a live Android device as I don't own one and can see the following (check screenshot)

Screen Shot 2023-06-08 at 10.23.39 AM.png
June 8, 2023 at 6:19 pm #13794997

vasilikiK-2

Well Bobby, if I knew I would have so much trouble with that theme I would avoid it, unfortunately I realized it after I have bought and set it up and it is too late now to change because it is high season for the restaurant operation (May to October). It's not the first time I build a multilingual site with wpml but it is the first time I face so much trouble.
So, I checked it on simulator too, both in IOS and on Android and I get the same as your screenshot, I checked it also on my daughter's Android and it looks the same, It seems I am the only one that keeps on getting the Noto font, so I will give up now and let it as it is. I guess it is much better than it was and consider that we solved the problem (You and me, not the theme's support grrrr) Thanks a lot Bobby for your time and effort. If you pass from Crete come over for beer and BBQ 😀

Screenshot_20230608-205729_Chrome.jpg
June 8, 2023 at 7:29 pm #13795473

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Yes, I completely agree with you! Glad that it is showing OK now on android phones and indeed it is much better than the cursive fonts.

Fun fact: I am from Chania, Crete (live in the US now), and stayed at Malia 2 years ago with my wife for a few days so I actually remember driving by the restaurant 🙂

June 9, 2023 at 6:55 am #13797045

vasilikiK-2

My issue is resolved now. Thank you for your help!
oups! Pressed "very hard' by mistake.