Tagged: translations
-
AuthorPosts
-
July 4, 2019 at 6:12 pm #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
IstvanJuly 6, 2019 at 11:56 pm #1116346Hey 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,
MikeJuly 7, 2019 at 12:20 pm #1116431Hi,
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
IstvanJuly 7, 2019 at 4:50 pm #1116459Hi,
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,
MikeJuly 8, 2019 at 1:38 pm #1116655Hi,
I copied the code block above, and unfortunately it still does not work …
Best regrads
IstvanJuly 9, 2019 at 3:05 am #1116845Hi,
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,
MikeJuly 9, 2019 at 8:02 am #1116942Hi,
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ánJuly 9, 2019 at 8:26 am #1116949Hi,
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ánJuly 10, 2019 at 8:23 am #1117323Hi,
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,
IsmaelJuly 10, 2019 at 10:15 am #1117357Hi,
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ánJuly 11, 2019 at 4:47 am #1117660July 11, 2019 at 12:07 pm #1117762Hi,
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ánJuly 12, 2019 at 5:56 am #1117933Hi,
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,
MikeJuly 12, 2019 at 8:57 am #1117978Hi,
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/
July 12, 2019 at 1:27 pm #1118079Hi,
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,
MikeJuly 15, 2019 at 12:35 pm #1118753Hi,
now it is fine, thank you. You can close the topic.
Best regards
IstvánJuly 15, 2019 at 1:20 pm #1118758Hi,
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 -
AuthorPosts
- The topic ‘Recent posts and date cannot be translated’ is closed to new replies.