Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #199529

    linda_vRum
    Participant

    Hi,

    I use WPML for translation of my website. My website is having 3 different languages right now and 2 more languages are coming. I know how to handle the .po and .mo files and all translations are working fine.

    Except…for one title. This is the Blog Title. I use the Renew stack of X-theme and I know that in the Customizer under ‘Renew’ are ‘Blog Options’ where you can edit the blog title. Only problem is it’s just for one language.

    So how can I edit this title in multiple languages? I can’t seem to find any option for that in WPML nor the .po file.

    Hope to hear from you guys.

    Thanks

    #199865

    Zeshan
    Member

    Hi there,

    Thanks for writing in!

    in order to translate the blog title, you can simply use WPML String Translation using X theme’s text domain, i.e. __x__.

    Thank you.

    #199954

    linda_vRum
    Participant

    Hi,

    Thanks for the reply!

    I do have string translation installed on my website but I don’t see any _x_ strings?

    Regards

    #199968

    linda_vRum
    Participant

    Mmm, I managed to find the strings with _x_ (function localize theme in WPML).

    Could you tell me which word I have to look for (since there are 983 entries for string translations) to find the blog title?

    Thanks in advance

    #199973

    linda_vRum
    Participant

    Check out this screenshot…this should be right no?

    screenshot string translation blog title

    #199974

    linda_vRum
    Participant

    Well, translation of ‘Blog Title’ is translation of Blog Title in customizer admin under ‘Renew’….

    #200022

    linda_vRum
    Participant

    Please tell me which string to translate..it looks to me like all strings are with words for in backend/customizer. I want to translate the frontend Blog title in 3 different languages.

    I’m tired of looking. Wasted 2 hours for one title. With no result. 🙁

    #200366

    Rad
    Moderator

    Hi there,

    I’m here to help 🙂

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Add this code at your child theme’s functions.php

    add_filter('option_x_renew_blog_title', 'enable_blog_title_translation' );
    function enable_blog_title_translation ( $title ) {
    return __( $title, '__x__' );
    }
    

    Then use your translation plugin to translate the title to your preferred strings 🙂

    Hope this helps.

    #200459

    linda_vRum
    Participant

    Thanks for your reply.

    I did exactly that, but when I rescan all strings I still get 983 results within the context __x__. So no strings were added after I created childtheme and added the code to the functions.php.

    Just wondering: why isn’t the blog page just displaying the page title as entered in WP backend, like all other pages?

    #200760

    Rad
    Moderator

    Hi there,

    Have you reloaded the page where the title is being display before scanning? It needs to be executed first.

    And please provide your admin login credentials so I can take a closer look too. You may provide them in private reply.

    Thanks!

    #200774

    linda_vRum
    Participant
    This reply has been marked as private.
    #201199

    Rad
    Moderator

    Hi there,

    Upon checking, you’re using a very old theme and plugin version. Which has no support yet for option filtering.

    Please updated your theme and plugin firsr.

    The latest X theme is 3.2.1, and your version is 1.7.4

    Thanks.

    #202067

    linda_vRum
    Participant

    Hi, thanks for checking! I’m ashamed I didn’t come up with that myself. 🙁

    I updated the theme and the plugins. Finally string translation works :)Hip hip hooray. But still: can I remove the custom code for translation of the blog title in the child theme + delete the child theme itself now? In other words, is translation of blog title embedded in the theme with the latest update?

    Few more questions:

    1. Where did Customizer in the backend menu go? I don’t see the cog-wheel anymore? It’s reachable via manual URL /wp-admin/customize.php but a menu item would be nice.

    2. How/where can I disable popovers/tooltips (after updating the theme image titles appear in popovers)

    3. How can I update visual composer?

    #202330

    Christopher
    Moderator

    Hi there,

    Please provide me exact URL so i can see which transition you mean.

    #1 The Customizer is now moved to Appearance > Customize in the latest version of the template.

    The Import/Export has been moved to the Tools section of the WordPress admin menu.

    #2 Please add this code in functions.php file inside child theme :

    // Data Attribute Generator (Popovers and Tooltips)
    // =============================================================================
    
    function x_generate_data_attributes_extra( $type, $trigger, $placement, $title = '', $content = '' ) {
    
      if ( ! in_array( $type, array( 'tooltip', 'popover' ) ) )
        return '';
    
      $js_params = array(
        'type'      => ( $type == 'tooltip' ) ? 'tooltip' : 'popover',
        'trigger'   => $trigger,
        'placement' => $placement,
        'title'     => $title,
        'content'   => $content
      );
    
      return x_generate_data_attributes( 'extra', $js_params );
    
    }

    #3 If you are having a problem updating Visual Composer, please go through the following steps.

    • Logout of your WordPress admin area.
    • Log back in to your WordPress admin area.
    • Go to Dashboard > Updates
    • Click the Check Again button a few times to clear out the update cache.
    • Updating Visual Composer should now work as expected.

    If the update still does not work, deactivating it first might help as well. If these methods do not seem to be working for you, you can locate the plugin .zip file itself within the theme at /x/framework/plugins/js_composer.zip and install that manually via the WordPress admin panel (i.e. Plugins > Add New > Upload Plugin).

    Hope it helps.

    #202348

    linda_vRum
    Participant

    #1. There is no ‘Customize’ under ‘Appearance’.
    #2. When I paste exactly this piece of code to my functions.php (child theme) whole website turns white.
    #3. Okay, I’ll have to update manually.

    For login URL+credentials see my private message above please.