Child theme translation file file not working

This topic has 8 replies, 3 voices, and was last updated 8 years, 4 months ago ago by Robert Hall

  • Avatar: mabellek
    mabellek
    Participant
    July 31, 2016 at 21:43

    Hi

    I am trying to translate the woopress child theme using loco translate.

    the translaation files are under themes/woopress-child/languages as recomended in your documentation

    Hi have translated some of the strings in the header but the translations are not taking effect.
    strings translated
    cart/ cart subtotal/ logout/ my account
    please assist in why they are not taking effect

    Please, contact administrator
    for this information.
    7 Answers
    Avatar: Robert Hall
    Robert Hall
    Support staff
    August 1, 2016 at 12:45

    Hello,

    Our theme is not compatible with this plugin.

    In this case we recommend you to translate theme via POedit or WPML plugin as described in our documentation:
    https://www.8theme.com/demo/docs/woopress/index.html#!/2_how_to_translate

    Regards,
    Robert Hall

    Avatar: mabellek
    mabellek
    Participant
    August 1, 2016 at 13:24

    Hi

    I have deactivated and deleted loco-translate
    opened default.po file from theme package
    opened in po-edit
    fixed language to hebrew
    translated the strings mentioned above
    cart/ cart subtotal/ logout/ my account
    saved changes
    saved as default-he_IL.po & default-he_IL.mo
    uploaded to themes/woopress-child/languages

    still no results

    please help

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 1, 2016 at 14:19

    Hello,

    You need to place theme translated files into the wp-content/themes/woopress/languages folder not to your child theme directory.
    Copy default.po translated file, translate in using POEdit, save as he_IL.po (it will generate both a .po and .mo files for your translation) and upload these files (.po and .mo) to the directory mentioned above.
    Next edit wp-config.php located in the root folder of WordPress and use the $locale with prefix with your language name which should be similar to the translation file name, in your case it’s $locale='he_IL';

    Best regards,
    Jack Richardson.

    Avatar: mabellek
    mabellek
    Participant
    August 1, 2016 at 14:25

    Hi

    with this solution what will happen everytime I update the theme ?

    And also will the wp-config.php change when I update wordpress ?
    thanks

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 1, 2016 at 14:37

    Hello,

    You won’t lose your translation after theme update as your translation files are renamed as he_IL.po and he_IL.mo.

    And also will the wp-config.php change when I update wordpress ?

    Don’t worry as WordPress update won’t affect your wp-config.php file.

    Best regards,
    Jack Richardson.

    Avatar: mabellek
    mabellek
    Participant
    August 1, 2016 at 20:24

    Hi

    Usually the way I update the theme is by deleting the woopress theme (parent theme) and the uploading the new theme and activating the chid theme again. In this case I would lose the he_IL files wouldnt I ?
    Could you recommend a better practise ?

    Thanks

    Avatar: Robert Hall
    Robert Hall
    Support staff
    August 2, 2016 at 07:30

    Hello,

    Here is video tutorial how to update theme.
    https://www.youtube.com/watch?v=KdWESIIPU1k
    (it’s for Legenda theme but the process is the same).

    Before update delete “woocommerce” folder in the directory wp-content/themes/woopress/ and it’ll be reuploaded from a new theme package.

    Regards,
    Robert Hall

  • Viewing 8 results - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.