Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1225510
    Gerald E
    Participant

    Hi,

    I am using Integrity 1 and set up a child theme.

    I followed all steps from here: https://community.theme.co/kb/translation/

    I placed __x__-de_AT.mo and __x__-de_AT.po
    in /wp-content/languages/themes
    AND(!) /wp-content/themes/x-child/languages

    – i adde the belwo code in functions.php in /wp-content/themes/x-child is:

    add_action( ‘after_setup_theme’, ‘load_child_language’ );
    function load_child_language() {
    load_child_theme_textdomain( ‘__x__’, get_stylesheet_directory() . ‘/languages’ );
    }

    still not working. what am i missing here pls?

    Thank you

    #1225827
    Nico
    Moderator

    Hi There,

    Thanks for writing in.

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

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

    Thanks.

    #1227077
    Gerald E
    Participant
    This reply has been marked as private.
    #1227078
    Gerald E
    Participant
    This reply has been marked as private.
    #1227088
    Christopher
    Moderator

    Hi there,

    Please rename your .po and .mo files to de_AT.

    Hope it helps.

    #1227148
    Gerald E
    Participant

    I solved the issue.

    Reason is that de_AT (For (austrian) German does not work). You can only set (German) German in wordpress as a language. So i changed filenames to “de_DE” and it works now.

    Is it correct that the mo and po file needs to be both in:
    /wp-content/languages/themes AND /wp-content/themes/x-child/languages folders???

    or which one is the correct one?

    Thanks

    #1227195
    Christopher
    Moderator

    Hi there,

    Yes, following code shows language files path :

    add_action( ‘after_setup_theme’, ‘load_child_language’ );
    function load_child_language() {
    load_child_theme_textdomain( ‘__x__’, get_stylesheet_directory() . ‘/languages’ );
    }

    And you should put both files in languages folder.

    Hope it helps.

    #1233819
    Gerald E
    Participant

    Hi, That was very helpful!
    So this all worked and I have translated X into German BUT….1 word won’t translate!

    It’s the category slug i.e. mysite.com/category/categoryname

    – wordpress language is set to german
    – I translated the word category with po and mo files and all other terms are translated.
    – I even refreshed perma links in the wordpress settings

    Any idea how this can be changed to: “dienstleistungen” ?

    Thanks for your great support!!

    #1233822
    Gerald E
    Participant
    This reply has been marked as private.
    #1234271
    Rad
    Moderator

    Hi there,

    You can’t translate the slug through po/mo files. You should use a plugin to do that, and working with permalinks and slugs is quite tricky. You should consult it to a developer.

    For example, the WPML, instead of translating the same instance of the post, it creates another copy where you input content, title, and slug (hence, two slugs that represent each language).

    Thanks!

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