Codeless
  • Support Home
  • Themes
  • Support
  • WordPress Tutorials
    • How to Start a Blog
    • Best Website Builders
    • Best Small Business Hosting
    • Email Marketing Services
    • Cheap WordPress Hosting
  • Video Tutorials

Community Forums

Theme translation with child theme

    • 9 years, 11 months ago NailedIT
      Participant

      Expired

      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

    • 9 years, 11 months ago Ruco
      Keymaster

      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!

    • 9 years, 10 months ago NailedIT
      Participant

      Expired

      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

    • 9 years, 10 months ago Mirela
      Participant

      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!

    • 9 years, 8 months ago NailedIT
      Participant

      Expired

      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

    • 9 years, 8 months ago Mirela
      Participant

      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!

    • 9 years, 7 months ago servicestation
      Participant

      Expired

      Can you add this

      part in the next release so I don’t have to build a child theme just for that ?

    • 9 years, 7 months ago Mirela
      Participant

      Hello,


      @servicestation
      ,
      yes, we will do that. Thanks for letting us know.

      Best regards!

Viewing 7 reply threads

You must be logged in to reply to this topic.

Login

Log In
Register

Renew Support

  • Renew Specular Support
  • Renew Tower Support
  • Renew Folie Support
  • Renew Handel Support
  • Renew June Support
  • Renew Picante Support
  • Renew Thype Support
  • Renew Regn Support

Search Forums

Forums

  • Bygge – Construction Theme
  • Converta – Software Theme
  • Folie – The WordPress Website Builder
  • Handel – Responsive Multi-Purpose Business Theme
  • June WooCommerce WordPress Theme
  • Livecast – Podcast Theme
  • Picante – Restaurant & Food WordPress Theme
  • Regn | Agency & Business WordPress Theme
  • Remake – Minimal Portfolio & Agency Theme
  • Specular – Multi-Purpose WordPress Theme
  • Suggest us Features
  • Tower – Business-Driven Multipurpose WP Theme
  • Vibrance – Photography Theme

Site Links

  • Support Policy
  • Specular Support Forum
  • Video Tutorials
  • Knowledge Base
  • Guides and Reviews

Useful Articles

  • Build a Website
  • Web Design & Development
  • Hosting
  • WordPress

Login

Log In
Register Lost Password