• I would like to assign a different font to the Arabic once it switches over. Is there a way to achieve this?

    i tried this code but it doesn’t work.. i conatact the theme support and they said ( the code not correct on your site”

    the code that i added is below :

    @import url(‘https://fonts.googleapis.com/css?family=Padauk&display=swap’);
    body.translatepress-ar_AR{ font-family:Padauk; }

    and second code :

    @import url(‘https://fonts.googleapis.com/css2?family=Cairo&display=swap’);
    body.translatepress-ar_AR{
    font-family: ‘Cairo’, sans-serif;
    }

    but non of them worked

    any help please

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi there, I have a similar problem. I’m using Oxygen theme builder by the way. For my english language pages I am using Poppins as my Display font and Open sans as my Body text font. I’m translating to Cambodian (Khmer). I’d like to use Angkor as my Display font and Hanuman for the Body text. I would be extremely grateful if you could help me.

    Thread Starter gentle2309

    (@gentle2309)

    hi ! i did one methode and it works for me ! i added a google font on my website !!

    i give a wonderful font that fits all website ! try it and you will see !
    here is the method :

    add this code in the header

    <link href=”https://fonts.googleapis.com/css2?family=Cairo&display=swap&#8221; rel=”stylesheet”>

    </head> <head>

    and then add this code in the css file .

    body{
    font-family: ‘Cairo’, sans-serif;
    font-size:20px;
    }

    Warning !!! you have to copy Header.php to yourtheme-child fil and add the code above

    Thanks I will try to see if I can do anything with your suggestion but as I am using Oxygen (which disables all themes) I think it might not be a solution for me. Also Khmer text is really crazy! Vowels before, after, above and below the consonants and also sometimes the consonants have “sub-script” versions.

    eg. ????????????????????

    Thread Starter gentle2309

    (@gentle2309)

    what is website URL and what font do you want to use !!

    It’s still under development but if you want to see here you go. https://www.cumw.org
    So the english fonts are Poppins as the display font and Open sans for the body text.

    My wish is to have ‘Angkor’ for the Display font (that is, to replace Poppins in the Cambodian version) and ‘Hanuman’ to replace the Open sans body text.

    Do you know the Oxygen builder?

    The Title next to the logo is Angkor and Poppins for the english

    “Collective Union of Movement of Workers”

    • This reply was modified 4 years, 5 months ago by nikikinz.

    I have a solution for this problem.
    You can use it with every themes or multi-language plugins.

    The first, you have to create 2 .css files.
    Each file has configuration for a language.
    For example:
    en.css

    
    @import url('https://fonts.googleapis.com/css?family=Padauk&display=swap');
    
    body {
      font-family: Padauk;
    }
    

    ar.css

    
    @import url('https://fonts.googleapis.com/css2?family=Cairo&display=swap');
    
    body {
      font-family: 'Cairo', sans-serif;
    }
    

    The second, you add the code below in <head> tag of header.php

    
    <?php if (get_locale() == 'en_GB') : ?>
    
    <link rel='stylesheet' href='/wp-content/themes/my-theme/layout/css/en.css' type='text/css' media='all' />
    
    <?php else : ?>
    
    <link rel='stylesheet' href='/wp-content/themes/my-theme/layout/css/ar.css' type='text/css' media='all' />
    
    • This reply was modified 4 years, 3 months ago by linherest. Reason: Format post
    • This reply was modified 4 years, 3 months ago by linherest. Reason: Format post
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘add two fonts for each languages’ is closed to new replies.