Setting another style to swap according to english once switching language

After contacting the support from WPML about the setting font style once switching language, they provided the answer as followed:

<?php if(ICL_LANGUAGE_CODE == 'en'){?>
//include English Styles
<?php }elseif(ICL_LANGUAGE_CODE == 'ar'){ ?>
//include Arabic Styles
<?php } ?>

1. I would be really appreciated if you can direct me how I can set the styles for such as H1, H1, Paragraph, etc so once we switch the language the fonts will be changed as expected.
2. How do I translate the 'Under Construction' page? http://victorycity-kh.com/

Thanks,
Sampheap


Comments

  • 1. To do that, you need to go to functions/theme-head.php file, find below code:
    wp_enqueue_style( 'custom', THEME_URI .'/css/custom.css', false, THEME_VERSION, 'all' );
    and replace it with below:
    if(ICL_LANGUAGE_CODE == 'en'){
        wp_enqueue_style( 'custom', THEME_URI .'/css/custom.css', false, THEME_VERSION, 'all' );
    } elseif(ICL_LANGUAGE_CODE == 'ar'){
        wp_enqueue_style( 'custom', THEME_URI .'/css/custom-ar.css', false, THEME_VERSION, 'all' );
    }
    of course you also need to create css/custom-ar.css file.

    2. We`ll do it with next update of course but at this moment we`ll give you explanation below what to do. In wpml-config.xml file, please find below line:
    <key name="translate-wpml-no" />
    and replace it with:
    <key name="translate-wpml-no" />
    <key name="construction-title" />
    <key name="construction-text" />
    <key name="construction-date" />
    <key name="construction-offset" />
    <key name="construction-contact" />
    And for translations, of course you need to use WPML String translation tool.
  • edited August 2014
    Mavelous!!! Thanks a lot for fast response.
    So if I modified the theme-head.php, then will it be replaced if the theme updated?

    It would be great if Be has this seek-after feature to define the font styles other than english because most of us always want to have our language shown along and with proper fonts display in multi language site too. I believe ppl will spread the word about this feature and it really encourage us to get Be and WPML for our site!

    And for the #2, I would rather wait for the update cz' update is so fast from the team :) rather than to mess around.

    Thanks Be team. 
  • Each file which is modified will be overwritten after update and this can`t be bypassed. But if you have any suggestions about future updates, then you can leave them on http://forum.muffingroup.com/betheme/discussion/113/your-suggestions-for-future-updates#latest
  • Just did it. Thank you.
  • Anyway, what are the code strings of those H1, H2, H3, H4, Paragraph?
    Do you have a doc. so we can re-define them in another font of another language?

    Are they:

    #header h2 {attributes}
    #comments h2
    #sidebar h2
  • To check what exactly css is, you need to use Firebug tool for Firefox. This tool was described in doc included into theme but you can check it also on http://themes.muffingroup.com/betheme/documentation/#theme-customizations
  • edited August 2014
    Thanks a lot for the link.
    So far no theme is seriously built with multi-language in mind not thinking how big the world is and how curious ppl want to build site with their own language a long with English, but defining font styles is a barrier for us average users; even the #1 theme 'Avada' doesn't have the option where fonts for second language can be defined once the language is switched.

    Hope Be will take a step further and set an example for the others. 
    I am just in love with Be and the team behind it, it's pushing its way very fast #9 now!!!
  • edited August 2014
    Of course we`ll about all your requests but we need time. We got lot`s of customers and currently we got large list of future updates that we work on. Also since 3 days you left such many requests that you need to be patient. We`ll think about all of them of course. And also please remember to leave all requests in right topic we gave you last time because most of them we get from this topic and this is the base for future updates.

    Thanks for understanding!
Sign In or Register to comment.