This topic has 6 replies, 3 voices, and was last updated 8 years by Laura.

  • Author
  • #66016
     creastic
    Participant

    Hello,
    I want to translate in french, I use the normal way in WordPress : I create “languages” folder into my child theme and I put “fr_FR.mo” into (create from fr_FR.po of the parent theme) and i put this code in functions.php :

    COPY CODE
    function my_child_theme_locale() {
        load_child_theme_textdomain( 'sweetdate-child', get_stylesheet_directory() . '/languages' );
    }
    add_action( 'after_setup_theme', 'my_child_theme_locale' );

    And it doesn’t work. Do you know why ?

    Thank You

    #66412
     Laura
    Moderator

    Hello, you should place translated files in wp-content/languages/themes with the name of the theme as you will find there

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #77065
     creastic
    Participant

    Hello,

    I put the file sweetdate-child-fr_FR.mo into wp-content/languages/themes folder, it doesn’t work.

    #77220
     Laura
    Moderator

    Hello, do not use the child name, just sweetdate. Let me know if it works

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #86300
     logobby
    Participant

    No it doesn’t work for me.
    And why you don’t have any function like other themes do to have the possibility to upload the translate file in the child theme/languages???
    Something like creastic has write…

    #86302
     logobby
    Participant

    Ok if somebody wish to add his translation in sweetdate-child/languages, just add the following code in your function.php of the child theme.

    // i18n
    load_theme_textdomain(‘kleo_framework’, get_template_directory() . ‘/languages’);

    /* add translation po in child theme */
    add_action( ‘after_setup_theme’, ‘my_child_theme_setup’ );
    function my_child_theme_setup() {
    load_child_theme_textdomain( ‘kleo_framework’, get_stylesheet_directory() . ‘/languages’ );
    }
    add_action( ‘after_setup_theme’, ‘sweetdate_setup’, 8 );

    It’s working for me 🙂

    Good luck!

    #86527
     Laura
    Moderator

    Hello, so this is resolved? 🙂
    This will be very helpful for others, thanks you 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

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

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?