• Resolved lepeuplier

    (@lepeuplier)


    I am not able to translate my Salient Child Theme from english to french.

    I added this code to my function.php file

    function my_child_theme_locale() {
        load_child_theme_textdomain( 'salient child', get_stylesheet_directory() . '/languages' );
    }
    add_action( 'after_setup_theme', 'my_child_theme_locale' );

    And I copied default.po and default.mo from the parent theme to the child theme and rename it : fr_FR

    Thanks

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tim W

    (@timwhitlock)

    I would guess “salient child” is not the correct text domain, particularly as it contains spaces and would not be a good choice for file names. Is this the string you are using for your translation calls? What are your files named? In what way are you “unable to translate”?

    I’m only here to provide support for my plugin, not to provide help with coding or implementing WordPress internationalisation. Have you read my guide to translating a child theme?

    Thread Starter lepeuplier

    (@lepeuplier)

    Hi Tim,

    I want to translate all english words from Salient theme to french words. I understand that there is a french translation for the parent theme and my child theme will sync it? But how do I do that?

    I only have 5 strings to translate, even if I push the sync button.

    In my FTP file manager, I have nothing. And in my parent theme, I renamed default.po and default.mo to fr_FR.po and fr_FR.mo

    Thanks

    Plugin Author Tim W

    (@timwhitlock)

    in my parent theme, I renamed default.po and default.mo to fr_FR.po and fr_FR.mo

    No. Undo that.

    I only have 5 strings to translate, even if I push the sync button.

    Probably because you’ve not added any valid translatable strings into your child theme. If you’re not adding any new strings to the child theme you can forget all about this part. You’re not being clear on whether this is the case.

    I understand that there is a french translation for the parent theme and my child theme will sync it?

    To change strings in the parent theme, translate the parent not the child. Are you asking how you translate a theme? Try the beginner’s guide for that.

    If (as it seems) your theme uses unconventional file names like default.po, then you’ll need to configure Loco Translate to use the rights files.

    I can’t offer any specific help with your theme, because it’s commercial. In my experience many commercial themes are badly set up for translation and don’t follow WordPress standards. If you run into trouble you should ask the theme vendor how their work should be translated.

    Thread Starter lepeuplier

    (@lepeuplier)

    Thanks for your time. It is working now, I translated my first word.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Translate Salient Child theme’ is closed to new replies.