-
-
Hi there,
I’m using a child theme and want to translate the language to german (for example the “comments”).
Normally, I can load the .po/.mo files within the child theme:
add_action( 'after_setup_theme', 'custom_load_childtheme_languages', 5 ); function custom_load_childtheme_languages() { load_child_theme_textdomain( 'codeless', get_stylesheet_directory() . '/languages' ); }
Somehow it doesn’t work with this theme. Any idea why?
I don’t want to use WPML, if I just have 1 language…
Thanks and best regards,
Michael
-
Hello,
The .po/.mo file are located at ‘specualr/lang’ at parent theme, try to change the path. Let us know if you still need help.
Best regards!
-
Hi,
It had nothing to do with the path, because I load the .po/.mo files of the child theme. But I could fix it.
But the “You are here” string for the breadcrumbs can’t be translated. Can you fix that?
Also, as I installed the latest version of the theme, my blog page isn’t working anymore. Just the header and menu is loaded, nothing else: https://www.michaelbruetsch.ch/blog/
Any idea why?
Thanks and best regards,
Michael -
Hello,
-Please go to file includes/view/page_header.php and find this line:
<li>You are here: </li>
Replace with this:
<li><?php echo esc_html(__('You are here', 'codeless')) ?>: </li>
Then just add the string and it’s translation in the .po/.mo fiels like any other missing string.-For the blog page, check again if it is still setup in Settings > Reading. Assign it, if not.
Best regards!
-
Hi,
Sorry for the late reply. It worked and the problem with the blog page was fixed with a theme update in the meantime.
But I have another problem: The line breaks in the comments are not shown (they are replaced with a simple space). I don’t think that’s on purpose? Can you fix that?
Thanks and best regards,
Michael
-
Hello,
Sorry for the late reply.
This is a wordpress restriction. It does not really depend on the theme. What you can do to create line breaks, is:
-use <br/> tag instead of the ‘enter’ key
-do not use more than one break tag per row as wordpress will automatically delete them.Best regards!
-
Can you add this
part in the next release so I don’t have to build a child theme just for that ?
-
-
You must be logged in to reply to this topic.