Skip Navigation

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

Problem: The default locale shown for Myanmar (Burmese) in that link is my_MM. I used that locale to create the secondary language I am currently translating into.

However, I found out that that particular language is based on Unicode. There are 2 main types of Burmese fonts (Zawgyi-One (95% of the population uses it) and Unicode (5% of the population uses it)) with different keyboard character arrangements and compatibility with different internet platforms.

For any browser chosen, ONLY one type of Burmese font can be readable.

Solution: Make sure that the font used on the website has support for the myanmar language. Also, make sure that the font you're using is not installed just locally, on the computer used to develop the website. This may cause the issue where the font is looking fine only on one computer.

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 42 replies, has 3 voices.

Last updated by hlaingM 8 months, 3 weeks ago.

Assigned support staff: Radu.

Author Posts
November 5, 2019 at 9:53 pm #4893863

Bruno

Hello,

Thank you. From what I noticed on your site, you are using Burmese characters in the English language. This is why the font we recommend is not running. In our code, we limit this font to only work in the secondary language:

// enable the font only if the locale is "mya"
if ( defined( 'ICL_LANGUAGE_CODE' ) && 'mya' == ICL_LANGUAGE_CODE ) {

Using only the:

if ( defined( 'ICL_LANGUAGE_CODE' ) ) {
    add_action( 'wp_enqueue_scripts', 'wpml_add_google_fonts' );
}

The font is loaded correctly. I will attach a picture for you to see.

Note: when 2nd tier support suggested the code above it was for English strings to be displayed with the current font on your site, and only when the user switched to Burmese would the "Padauk" font be used.

Thank you.

November 6, 2019 at 5:27 pm #4900671

hlaingM

Hi,

Thank you for an update.

Just for your info, I do not have "Burmese switch" at my site as there are some theme and WPML incompatibilities that make me to have to remove the "Burmese switch" at this moment until those incompatibility issues are fixed. Consequently, I want the Burmese unicode font used even for the English language.

The good news is that with what you just did, I can NOW see those Burmese characters on the home page on other computers. Perhaps, "padauk" font is currently being temporarily installed/used on the browser of those computers.

The issue now I have is that I do not like that font (perhaps, it is "padauk"?) that do not present good font appearances/look on my site.

(1) Where/how can I check what font is being used now?

(2) Based on what I see (my default fonts do not look like they do now), your google font (NOT my default font) is being used even for the English language, contrary to what you said. How can I make sure that other Burmese unicode font (like myanmar3) is being used in lieu of that google font?

Thank you.

November 6, 2019 at 9:10 pm #4901785

Bruno

Hello,

>>> The issue now I have is that I do not like that font (perhaps, it is "padauk"?) that do not present good font appearances/look on my site.

If you want to use some other font, you can follow the steps I posted earlier: https://wpml.org/forums/topic/default-locale-issue/page/2/#post-4829859. For Google fonts, this is the only font available to render content with Burmese.

>>> (1) Where/how can I check what font is being used now?

Using your browser, using the right mouse button click to inspecting the element. Look at the "body" tag. I will attach a picture for you to see.

>>> (2) Based on what I see (my default fonts do not look like they do now), your google font (NOT my default font) is being used even for the English language, contrary to what you said. How can I make sure that other Burmese unicode font (like myanmar3) is being used in lieu of that google font?

As I explained above, previously the code was focused on displaying the "Padauk" font only when the site was viewed in "Myanmar" (language code "mya"). When I changed the code above to display in any language, the font "Padauk" was applied even in English.

In other words, the code you are using is now applying this same font to all languages (the font character is not looked, the font is being applied to all characters).

Thank you.

November 7, 2019 at 7:40 pm #4909759

hlaingM

Hi,

hidden link

(1) I uploaded the font (myanmar3-regular) at the link your provided and it generates webfontkit zip file which contains several files. There, I get lost. Could you please provide the detailed steps on how to proceed to replace "Padauk" with that new unicode font?

(2)The screenshot you provided is too blurry to see. But, when I inspected via mouse right click, I did not see any fonts in "body class". I assume from what you said, the font being applied now is "Padauk"????

Thanks.

November 7, 2019 at 7:56 pm #4909869

Bruno

Hi,

1) You will need to upload these fonts to your server and then you will need to add them in CSS. In the code I posted earlier, you should replace the Google URL with the source URL that is on your server. Then just change the font name also within the previously submitted code.

I searched Google for a step-by-step (as this is not related to WPML): hidden link

2) Yes, the font used right now is "Padauk".

Thank you.

November 8, 2019 at 6:07 am #4910953

hlaingM

Hi,

Thank you for your info.
(1) The codes you provided have the following link:
wp_enqueue_style( 'wpml-google-fonts', 'hidden link', false );

I am making a web font using a different unicode. What am I supposed to do with that link that shows "Padauk"? Do I have to replace that URL with what?

(2) In your earlier message, you mentioned that "pyidaungsu" was NOT a web font. How can one know it is not a web font? For "pyidaungsu" font, the web font cannot be generated because it is not a web font (or) due to copyright issue?

Thank you very much.

November 8, 2019 at 1:49 pm #4913829

hlaingM

Hi,

Thank you for your info.
(1) The codes you provided have the following link:
wp_enqueue_style( 'wpml-google-fonts', 'hidden link', false );

I am making a web font using a different unicode. What am I supposed to do with that link that shows "Padauk"? Do I have to replace that URL with what?

(2) In your earlier message, you mentioned that "pyidaungsu" was NOT a web font. How can one know it is not a web font? For "pyidaungsu" font, the web font cannot be generated because it is not a web font (or) due to copyright issue?

(3) I keep the same http google link discussed in (1). I am able to see a different font (most likely the font I set-myanmar3). However, the codes you gave for functions.php seem to be overriding all the other css font styles/features manipulation options. For instance, I have a different add-on feature that allows users to buy "highlight-text". I just noticed that those kind of text-style manipulations do not work any longer. How can I get around that issue in applying the font I want?

Thank you very much.

November 8, 2019 at 7:16 pm #4916363

Bruno

Hello,

>>> I am making a web font using a different unicode. What am I supposed to do with that link that shows "Padauk"? Do I have to replace that URL with what?

You should replace it with the URL that will be where your CSS and web fonts are located. See the link I posted earlier that explains this in detail.

>>> (2) In your earlier message, you mentioned that "pyidaungsu" was NOT a web font. How can one know it is not a web font? For "pyidaungsu" font, the web font cannot be generated because it is not a web font (or) due to copyright issue?

This is not a web font at the moment. You can take the font files and then generate a web font about it. This may be due to copyright or perhaps simply the author of the source does not want to. I haven't searched this deeply to know the reason, but on the site (which apparently is the official site) they have the font only for installation on the devices.

>>> I just noticed that those kind of text-style manipulations do not work any longer. How can I get around that issue in applying the font I want?

Maybe you have some CSS that is overwriting this. You will need to look at this to see why the style is not being applied to this particular element.

--

As I explained above, this is not related to WPML. Note that this is related to the typography of your theme and not to WPML. That way, I suggest you see the link I posted earlier and if necessary, contact the author of your theme so that he can help you (maybe even natively including the font you want).

Unfortunately, changing the typography of the site is beyond the scope of our support. Our support should focus only on WPML and not on the typography of the site, which is more related to the author of the theme. I should suggest that you contact him so he can help you and maybe even make it possible for the theme to use the font you want by default.

If you prefer, you can contact one of our certified partners who can develop small to large features for your site: http://wpml.org/documentation/support/wpml-contractors/

Thank you.

November 11, 2019 at 3:57 pm #4926495

hlaingM

Hi,

Thank you very much.

I watched the video link you video and followed the instruction given in the video but nowhere did I see anything about the URL link for the font I try to apply (hidden link.......)which is in your code.

wp_enqueue_style( 'wpml-google-fonts', 'hidden link', false );

But, even without removing that link that is associated with a different font "Padauk", the font I am trying to apply works. So I am wondering if that url link is doing nothing.

At least, I've found your video link to be very helpful. Thank you very much for that.

November 11, 2019 at 9:21 pm #4928237

Bruno

Hello,

As you are not going to use Google font, then you need to edit this URL to use the CSS URL you are going to load that font from (where you have the @font-face).

Or you can simply use @font-face inside style.css and add the URL where the fonts are located: hidden link

Thank you.

November 12, 2019 at 3:39 am #4928919

hlaingM

Hi,

Yes, I added the following codes in style.css along with font files in the same folder as instructed in the video.

@font-face {
font-family: 'myanmar3regular';
src: url('myanmar3_jan2011.woff2') format('woff2'),
url('myanmar3_jan2011.woff') format('woff');

font-style: normal;

}

But, I don't know what to do with the following (fonts.googleapis.com) URL links in functions.php

wp_enqueue_style( 'wpml-google-fonts', 'hidden link', false );

Do I have to leave them as it is?
Thank you

November 13, 2019 at 11:39 am #4938303

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hey,

My colleague Bruno is not here for the moment so I hope it's all right if I have a look at this ticket.

You can delete that line of code from the functions.php file. If things are still working well, you can keep it that way.

Thanks,
Radu

November 13, 2019 at 5:50 pm #4941871

hlaingM

My issue is resolved now. Thank you!