New Landing How can we help? Atelier Translation-file in child theme

Viewing 10 posts - 1 through 10 (of 10 total)
  • Posted in: Atelier
  • #247877
    BBMagnus
    Member
    Post count: 20

    Where do I put the translation files in my child theme? I have tried to put them in the wp-content/languages/themes folder and naming it atelier-sv_SE.po but it’s not working. What I’m doing right now is that I override the files in the atelier/language folder but they are replaced in the update. How do I add translations that are sustainable and kept on theme updates?

    #247888
    David Martin – Support
    Moderator
    Post count: 20834

    Put them in the child theme directory: wp-content/atelier-child/languages/

    Then tell the child theme to load the languages:

    add_action( 'after_setup_theme', 'my_child_theme_setup' );
    function my_child_theme_setup() {
        load_child_theme_textdomain( 'my_child_theme', get_stylesheet_directory() . '/languages' );
    }

    Thanks.

    #247911
    BBMagnus
    Member
    Post count: 20

    The problem is that the parent theme, Atelier, is not fully translated in swedish / the translations are not correct. I want to fix these translations but I can’t load my own translations for the theme Atelier.

    #247924
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please refer this article http://www.swiftideas.com/knowledgebase/translating-the-theme-using-poedit/ to translating the theme. It will help you step by step.
    Thanks
    Mohammad

    #247944
    BBMagnus
    Member
    Post count: 20

    Well in that guide you replace the file in wp-content/themes/atelier/languages/, this means that when I update atelier my language files will be overwritten, will it not?

    #247949
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please put at /wp-content/atelier-child/languages/. and paste this code at functions.php of child theme.

    add_action( 'after_setup_theme', 'my_child_theme_setup' );
    function my_child_theme_setup() {
        load_child_theme_textdomain( 'swiftframework', get_stylesheet_directory() . '/languages' );
    }

    Thanks
    Mohammad

    #249231
    BBMagnus
    Member
    Post count: 20

    It doesn’t seem to override the translations in the main theme for some reason…

    #249232
    David Martin – Support
    Moderator
    Post count: 20834

    Please add your FTP details.

    It must be named this sv_SE.po not this atelier-sv_SE.po.

    Thanks.

    #249262
    BBMagnus
    Member
    Post count: 20

    Works now!

    #249264
    David Martin – Support
    Moderator
    Post count: 20834

    Great, no problem!

    Thanks.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register