Tagged: 

Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #1115854

    Hi,
    my homepage is in german and hungarian. There is a problem in the blog part. In german everything is fine, but in hungarian “recent posts” is not and cannot be translated. In poedit also in enfold.po(t) I cannot find “recent posts”. The same is with the publication date, where the month “March” is not translated: http://impropage.com/hu/ujdonsagok/

    Please help me to resolve this.

    Thanks
    Istvan

    #1116346

    Hey Istvan,
    Sorry for the late reply, to change the “recent posts” heading Try adding this code to the end of your functions.php file in Appearance > Editor:

    function custom_recent_posts(){
      ?>
      <script>
    (function($){
      $(document).ready(function(){
      $("#recent-posts-2 h3.widgettitle").text("LEGUTÓBBI HOZZÁSZÓLÁSOK");
      });
     })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'custom_recent_posts');

    Please adjust the text to suit.
    For the date, please go to WordPress > Settings > General > Date Format and choose a format that is all numbers.
    Have you checked for a newer language file from WordPress?

    Best regards,
    Mike

    #1116431

    Hi,

    if I go to Appearance > Theme Editor (not Editor) and add the code, I read something like “there are 25 problems …” so it does not work.

    For the date: if I go to WordPress > Settings > General > Date Format and choose a format that is all numbers, on the side-bar under “archives”still appears “March” (not a translation), so unfortunately this is not a solution.

    I would like to mention that the german version works perfectly, and the german po file contains “recent posts”. So, perhaps the solution is to get a hungarian po file with the same content (in english) …

    The main language of the website is german. How can I check for a newer language file (hungarian) from WordPress

    Best regards
    Istvan

    #1116459

    Hi,
    Perhaps you copied the code from an email and not the code block above, typically this causes quotes to be pasted as curly quotes that cause errors.
    If this still doesn’t work, we could take a look if we had a login.

    Best regards,
    Mike

    #1116655

    Hi,

    I copied the code block above, and unfortunately it still does not work …

    Best regrads
    Istvan

    #1116845

    Hi,
    Thanks for the login, I found that no functions were added to the child theme functions.php, so I added the code above.
    Now the “recent posts” is changed to “LEGUTÓBBI HOZZÁSZÓLÁSOK” please adjust to suit.
    Please clear your browser cache and check.
    Please see the screenshot in Private Content area.

    Best regards,
    Mike

    #1116942

    Hi,

    now I see, that to add something to the function.php file, I have to go to the right side-bar and klick “Theme functions”. But unfortunately still not all issues are resolved.
    1. Now the “recent posts” is changed to “LEGUTÓBBI HOZZÁSZÓLÁSOK” also in the german version. This version with the german translation was fine and sholuld not be changed.
    2. In “ARCHÍVUM” the date is not translated and in a wrong order. Now it is: “March 2019” and it should be “2019. március”.

    Best regards
    István

    #1116949

    Hi,

    the second issue (date) is almost resolved. Now it is: “2019 március” and it should be “2019. március”. After the “9” a “.” is missing.

    Best regards
    István

    #1117323

    Hi,

    Thank you for the update.

    Try to translate the text using the “Loco Translate” plugin.

    // https://wordpress.org/plugins/loco-translate/

    You may need to add the translations manually if they don’t exist yet. You can use the POEdit app for that.

    Best regards,
    Ismael

    #1117357

    Hi,

    I did not have to use loco translate, and did not have to translate “recent post” in poedit. By the way – as I already wrote! – the translation in poedit is not possible, because “recent post” is not in the po file (see July 4). I really wonder where it is, because now it works.

    What I did: 1. changed wordpress language to hungarian 2. updated the language file (hungarian) from WordPress 3. deleted the code in the end of the functions.php.

    Anyway, the second issue (date) is still not resolved!!! Now under archivum (archive) is: “2019 március” and it should be “2019. március”. After the “9” a “.” is missing!!! How can I get a point after 2019?

    Best regards
    István

    #1117660

    Hi,
    To add the dot in your date please add it in the date field at: WordPress > Settings > General > Date Format
    2019-07-10-224255

    Best regards,
    Mike

    #1117762

    Hi,

    as far as I see the date field at: WordPress > Settings > General > Date Format influences the way the date, which is under the title of the “blog” on the left side. But there is no problem! You can see “2019. március 4.”, so after 2019 there is a dot. The dot is missing in the right sidebar under archivum (archive). There you see “2019 március”: http://impropage.com/hu/ujdonsagok/

    What can I do?

    Best regards
    István

    #1117933

    Hi,
    Thanks for the link, I added this function in your child theme functions.php:

    function custom_script(){
      ?>
      <script>
    (function($){
      $(document).ready(function(){
      $('#archives-2 li a').each(function() {
        var text = $(this).text();
        $(this).text(text.replace('2019', '2019.')); 
    });
    });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'custom_script');

    Please check

    Best regards,
    Mike

    #1117978

    Hi,

    The hungarian date is ok now. But in the german version under “archive” there is a dot after “2019” too!!! This is not ok!!! http://impropage.com/neuigkeiten/

    #1118079

    Hi,
    Thanks for the feedback, I added “#top:lang(hu)” to the script so the dot will only show for the HU language. Please clear your browser cache and check.

    Best regards,
    Mike

    #1118753

    Hi,

    now it is fine, thank you. You can close the topic.

    Best regards
    István

    #1118758

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)

    Best regards,
    Mike

Viewing 17 posts - 1 through 17 (of 17 total)
  • The topic ‘Recent posts and date cannot be translated’ is closed to new replies.