Forum Replies Created

Viewing 1 replies (of 1 total)
  • 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 5 years, 9 months ago by linherest. Reason: Format post
    • This reply was modified 5 years, 9 months ago by linherest. Reason: Format post
Viewing 1 replies (of 1 total)