Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1098239
    yoni p
    Participant

    Hi, i am using ethos stack, i have translated all strings successfully with po mo methos following x theme instruction(with poedit).
    for some wierd reason , one particular string refuse to get translated.
    it’s the string which says “Comments” and the number of comments beside it under the post heading.
    i attached the translated po file and a screenshot where the string is located on the page, i hope you can help me, cause it’s driving me crazy.
    regards.

    #1098267
    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! Regretfully the po file wasn’t uploaded. You need to zip it first and then upload it again. For the meantime, please add the following code in your child theme’s functions.php file

    // Translate Comments
    // =============================================================================
    function change_comments($translated) { 
      $translated = str_ireplace('%s Comment', '%s insert your translation here', $translated);
      return $translated; 
    }
    add_filter('gettext', 'change_comments' );
    // =============================================================================

    Please let us know if this works out for you. Thank you.

    #1099661
    yoni p
    Participant
    This reply has been marked as private.
    #1099668
    Rue Nel
    Moderator

    Hello There,

    That could be a bug in your version. X 4.6 is now available in automatic updates! This release contains hotfix for several issues so be sure to check out the changelog. Please do update to the latest version. After doing the updates, always remember to clear all caches when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

    After the updates if still the text is not translated, you could try to add this code in your child theme’s functions.php file. And please translate the text found in the code. You can get the code from here: http://pastebin.com/T5ZhWB4F

    Please let us know how it goes.

    #1099856
    yoni p
    Participant

    i upgrade to version 4.6 and put the code in function.php with the translation but still it doesnt work.
    the mo/po files are located in child theme, but in the parent theme,at x/framework/lang, there is a file x.pot.
    should i delete it?

    #1100037
    Rad
    Moderator

    Hi there,

    How’d you translate it? x.pot is a template you’ll use for translation. Please check it here https://community.theme.co/kb/translation/

    Thanks!

    #1100048
    yoni p
    Participant
    This reply has been marked as private.
    #1100321
    Rue Nel
    Moderator

    Hello There,

    Would you mind providing us the url of your site with login credentials so we can take a closer look and fix the issue? This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    To do this, you can make a post with the following info:
    – Link to your site

    – WordPress Admin username / password
    – FTP Hostname
    – FTP Username
    – FTP Password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thank you.

    #1100974
    yoni p
    Participant
    This reply has been marked as private.
    #1101199
    Rue Nel
    Moderator

    Hello There,

    Thanks for providing the information. The code I have provided in the previous reply (https://community.theme.co/forums/topic/cannot-translate-string/#post-1099668) should have work. The problem is that you have installed a caching plugin, WP Super Cache and WordFence. You must always clear the plugin caches after any updates or after making any of the changes in your site. You have to clear all caches when updating so that the code from the latest changes is always in use. This will help you to avoid any potential errors.

    Hope this make sense.

    #1101319
    yoni p
    Participant

    thanks alot

    #1101375
    Rue Nel
    Moderator

    You’re welcome! We’re happy to help you out.
    If you need anything else we can help you with, don’t hesitate to open another thread.

  • <script> jQuery(function($){ $("#no-reply-1098239 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>