Home Forums Basel support forum Different fonts for different languages in WPML

Different fonts for different languages in WPML

Viewing 26 posts - 1 through 26 (of 26 total)
  • Author
    Posts
  • #53120

    Baxo
    Participant

    Hello, is there a way to use another font for text, when I switch to another language in WPML?

    #53175

    Hello,

    Unfortunately, WPML does not provide such an option. Font-family is usually set globally for all text tags. The only way out is to create custom CSS and paste it in each page with WP Page Builder or find a plugin. If you decide to put the code into each page please note that all the WooCommerce templates anyway will be configured globally by fonts set in Theme Settings.

    #53182

    Baxo
    Participant

    Thank you for replay, i have one more question how to upload a custom font? i need Georgian fonts and unfortunately it not in Typekit

    #53186

    Artem Temos
    Keymaster

    Unfortunately, there is no option to upload custom fonts in our Theme Settings. Here is an article that should help you upload and use your custom fonts with a bit of additional code customization https://premium.wpmudev.org/blog/custom-fonts-css/

    #54894

    Baxo
    Participant

    Hi Xtemos Team.
    I have 2 problems and i home that you can help me with this

    1) I uploaded font in public_html/wp-content/themes/basel-child/fonts.
    after that i paste this code in custom scc,

    @font-face{font-family:’BPG Arial Caps’;
    src:url(public_html/http://urbannews.info/wp-content/themes/basel-child/fonts/bpg-arial-caps-webfont.eot);
    src:url(public_html/http://urbannews.info/wp-content/themes/basel-child/fonts/bpg-arial-caps-webfont.eot?#iefix) format(’embedded-opentype’),
    url(public_html/http://urbannews.info/wp-content/themes/basel-child/fonts/bpg-arial-caps-webfont.woff2) format(‘woff2’),
    url(public_html/http://urbannews.info/wp-content/themes/basel-child/fonts/bpg-arial-caps-webfont.woff) format(‘woff’),
    url(public_html/http://urbannews.info/wp-content/themes/basel-child/fonts/bpg-arial-caps-webfont.ttf) format(‘truetype’),
    url(public_html/http://urbannews.info/wp-content/themes/basel-child/fonts/bpg-arial-caps-webfont.svg#bpg_arial_capsregular) format(‘svg’)}

    but this font does not shown in typography

    2)

    http://prntscr.com/jam2wb

    in first column i changed space between text line with css but after updating its not working and everything going back in starting position

    http://prntscr.com/jam59l

    Thank you in advance

    #54928

    Bogdan Donovan
    Keymaster

    Hi,

    Try to add the following code to your child theme style.css file. You can add or remove parts of the сss code that is responsible for a certain part of the text on the site.

    @font-face {
        font-family: 'BPG Arial Caps';
        src: url('http://urbannews.info/wp-content/themes/basel-child/fonts/bpg-arial-caps-webfont.eot'); /* IE9 Compat Modes */
        src: url('http://urbannews.info/wp-content/themes/basel-child/fonts/bpg-arial-caps-webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
             url('http://urbannews.info/wp-content/themes/basel-child/fonts/bpg-arial-caps-webfont.woff2') format('woff2'), /* Super Modern Browsers */
             url('http://urbannews.info/wp-content/themes/basel-child/fonts/bpg-arial-caps-webfont.woff') format('woff'), /* Pretty Modern Browsers */
             url('http://urbannews.info/wp-content/themes/basel-child/fonts/bpg-arial-caps-webfont.ttf') format('truetype'), /* Safari, Android, iOS */
             url('http://urbannews.info/wp-content/themes/basel-child/fonts/bpg-arial-caps-webfont.svg#bpg_arial_capsregular') format('svg'); /* Legacy iOS */
    }
    
    /*Text font*/
    
    body, p, .widget_nav_mega_menu .menu > li > a, .mega-navigation .menu > li > a, .basel-navigation .menu > li.menu-item-design-full-width .sub-sub-menu li a, .basel-navigation .menu > li.menu-item-design-sized .sub-sub-menu li a, .basel-navigation .menu > li.menu-item-design-default .sub-menu li a, .font-default {
    	font-family: 'BPG Arial Caps';
    }
    
    /*Primary font*/
    
    h1 a, h2 a, h3 a, h4 a, h5 a, h6 a, h1, h2, h3, h4, h5, h6, .title, table th, .wc-tabs li a, .masonry-filter li a, .woocommerce .cart-empty, .basel-navigation .menu > li.menu-item-design-full-width .sub-menu > li > a, .basel-navigation .menu > li.menu-item-design-sized .sub-menu > li > a, .mega-menu-list > li > a, fieldset legend, table th, .color-scheme-dark .info-box-inner h1, .color-scheme-dark .info-box-inner h2, .color-scheme-dark .info-box-inner h3, .color-scheme-dark .info-box-inner h4, .color-scheme-dark .info-box-inner h5, .color-scheme-dark .info-box-inner h6 {
    	font-family: 'BPG Arial Caps';
    }
    
    /*Entities names*/
    
    .product-title a, .post-slide .entry-title a, .category-grid-item .hover-mask h3, .basel-search-full-screen .basel-search-inner input[type="text"], .blog-post-loop .entry-title, .single-product-content .entry-title, .font-title {
    	font-family: 'BPG Arial Caps';
    }
    
    /*Widget titles font*/
    
    .widgettitle, .widget-title {
    	font-family: 'BPG Arial Caps';
    }
    
    /*Navigation font*/
    
    .main-nav .menu > li > a {
    	font-family: 'BPG Arial Caps';
    }

    Try to add the following code snippet to child-theme style.css or the custom CSS area in theme settings to control menu items indentations.

    .basel-navigation .menu > li.menu-item-design-full-width .sub-sub-menu li a, .basel-navigation .menu > li.menu-item-design-sized .sub-sub-menu li a {
    	padding: 6px 0;
    }

    Regards

    #55039

    Baxo
    Participant

    Thank you for respond
    I added that code in style.css but font doesn’t show anywhere

    https://prnt.sc/jaun2b

    http://prntscr.com/jaunfo

    #55095

    Bogdan Donovan
    Keymaster

    Hi,

    Please, try to clear all typography fields from default theme fonts https://gyazo.com/59fff6d7f9a8ff0ac9777c25483da9eb and then style nesting will be working normally https://gyazo.com/92c54ec7bd803c2f40155b2dfa2d31f8.

    Regards

    #55098

    Baxo
    Participant

    Thank you very much i have one more question 🙂
    I cant find name of this line
    http://prntscr.com/jb1dlv

    I want to hide it

    #55148

    Bogdan Donovan
    Keymaster

    Hi,

    Try to add this CSS code snippet.

    .navigation-wrap {
    	border-top: none;
    }

    Regards

    #55195

    Baxo
    Participant

    Thank you for queckly respond, i have problem with FAQ page. after opening all FAQ “sale” setting and moving on other tab “terms & conditions” in lower sections appears empty space

    https://gyazo.com/7f1ad580681cca7ce5b8dbbc7df341a5

    https://gyazo.com/940bfae63203b17fc895a088a052dd34

    thank you in advance.

    #55218

    Hello,

    Unfortunately, this is the bag of WP Bakery Page builder. Try to deactivate all the third parties plugins not related to the theme and activate them one by one to find out which plugins influence. Sometimes it helps.

    Best Regards

    #55235

    Baxo
    Participant

    I deactivated all plug-ins, except wpbakery and woocommerce but its not working.
    and when i deactivated woocommerce there is
    Fatal error: Call to undefined function is_shop() in /…/public_html/wp-content/themes/basel/inc/functions.php on line 46

    #55246

    Hello,

    No, no need to activate Woocommerce and other plugins which are supplied with the theme. Additional plugins not related to the may cause the problem. At the same time, it is an error with Wpbakery our theme does not influence.

    One more suggestion: try and test Accordion or Tour element. They are equal to FAQ in its functionality http://prntscr.com/jbkk76

    Best Regards

    #55248

    Baxo
    Participant

    Thank you for respond
    I have not that options
    https://gyazo.com/b08926cd75c01a2687b667c9791bed5d

    #55304

    Hello,

    Please send me your site admin access.

    Best Regards

    #55619

    Baxo
    Participant

    Hi, is it possible to add “mega menu list title effect” on Text block?

    https://gyazo.com/d7ab9b77ebadabc78f0f7588799fa8ee

    I hope that it will be possible
    Thank you in advance

    #55640

    Bogdan Donovan
    Keymaster

    Hi,

    Try to add custom custom-text-element class https://gyazo.com/99f21b6cf54e9d24c534444d21528699 to your text-element and add following CSS code snippet to Custom CSS area in theme settings

    body .custom-text-element h4 {
      line-height: 1;
    }
    
    body .custom-text-element h4 a {
      font-size: 16px;
      font-weight: 600 !important;
      letter-spacing: .3px;
      line-height: 1.4;
      text-transform: uppercase;
      color: #1B1919;
    }
    
    body .custom-text-element a strong {
      font-weight: 600 !important;
    }
    
    body .custom-text-element a:hover {
      text-decoration: none;
      color: #b63d44!important;
    }

    Regards

    #55671

    Baxo
    Participant

    Thank you very much

    #55672

    Bogdan Donovan
    Keymaster

    You are welcome!

    #55679

    Baxo
    Participant

    I have these warning signs, is that a problem?

    https://gyazo.com/57b77b64c035e6b99bf6326af4d14f4e

    #55685

    Eric Watson
    Participant

    Just ignore this warning.

    #55749

    Baxo
    Participant

    hi, i’m trying again to use different fonts for different languages, I have found out that this is possible with creating 2 style.css, is it realy possible?

    <?php if(ICL_LANGUAGE_CODE == ‘en’){?>
    //include English Styles or Font
    <?php }elseif(ICL_LANGUAGE_CODE == ‘ka’){ ?>
    //include Georgian Styles or Font
    <?php } ?>

    #55767

    Bogdan Donovan
    Keymaster

    Hi,

    Sorry, but we don’t have an instruction for this since it is not a theme related question. You would you need to contact WPML support with this question.

    Kind Regards

    #58950

    Baxo
    Participant

    Hi,
    I need little support from you guys,
    My font showing everywhere Except for “yith compare”
    Im using this code (down bellow)
    Thank you in advance
    Best regards

    /*Text font*/

    body, p, .widget_nav_mega_menu .menu > li > a, .mega-navigation .menu > li > a, .basel-navigation .menu > li.menu-item-design-full-width .sub-sub-menu li a, .basel-navigation .menu > li.menu-item-design-sized .sub-sub-menu li a, .basel-navigation .menu > li.menu-item-design-default .sub-menu li a, .font-default {
    font-family: ‘BPG Arial Caps’;
    }

    /*Primary font*/

    h1 a, h2 a, h3 a, h4 a, h5 a, h6 a, h1, h2, h3, h4, h5, h6, .title, table th, .wc-tabs li a, .masonry-filter li a, .woocommerce .cart-empty, .basel-navigation .menu > li.menu-item-design-full-width .sub-menu > li > a, .basel-navigation .menu > li.menu-item-design-sized .sub-menu > li > a, .mega-menu-list > li > a, fieldset legend, table th, .color-scheme-dark .info-box-inner h1, .color-scheme-dark .info-box-inner h2, .color-scheme-dark .info-box-inner h3, .color-scheme-dark .info-box-inner h4, .color-scheme-dark .info-box-inner h5, .color-scheme-dark .info-box-inner h6 {
    font-family: ‘BPG Arial Caps’;
    }

    /*Entities names*/

    .product-title a, .post-slide .entry-title a, .category-grid-item .hover-mask h3, .basel-search-full-screen .basel-search-inner input[type=”text”], .blog-post-loop .entry-title, .single-product-content .entry-title, .font-title {
    font-family: ‘BPG Arial Caps’;
    }

    /*Widget titles font*/

    .widgettitle, .widget-title {
    font-family: ‘BPG Arial Caps’;
    }

    /*Navigation font*/

    .main-nav .menu > li > a {
    font-family: ‘BPG Arial Caps’;
    }

    #58968

    Artem Temos
    Keymaster

    Sorry, but YITH Wishlist doesn’t support child theme style.css files and that is why your custom styles will not work there.

Viewing 26 posts - 1 through 26 (of 26 total)