Loco Translate - by ejder077 - on WordPress WooCommerce support

This topic has 4 replies, 3 voices, and was last updated 4 years, 11 months ago ago by Olga Barlow

  • Avatar: ejder077
    ejder077
    Participant
    May 17, 2019 at 12:00

    Hi,

    If I want to use Loco Translate to translate some words from XStore, which file should I translate? XStore Child or XStore?

    https://ibb.co/TbfT86h

    I am using XStore Child if I am right.

    Thank you

    3 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    May 17, 2019 at 12:23

    Hello,

    You need to translate parent xstore theme, you don’t need to translate child theme. I think you did not make changes in the child theme that have child theme text domain.
    Please read this article https://xstore.helpscoutdocs.com/article/30-base-theme-translation
    Feel free to ask, if you have any other questions.

    Regards

    Avatar: ejder077
    ejder077
    Participant
    May 17, 2019 at 12:33

    Since I am using XStore Child now, if the theme is updated later, will I lose my translation?

    Also, the Po. files (https://ibb.co/TbfT86h) were created by me just an hour ago, I did not make any change in these 2 files. Since I selected the wrong location (Languge/loco/theme/xstore) when I was creating it, can I just delete them and recreate a new one? Will that causes any negative effect?

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    May 17, 2019 at 14:37

    Hello,

    1) You need child theme translation files only in case you added custom code in child theme that includes localization functions, for example
    echo _n( '%s star', '%s stars', 1 ); etc.
    If you don’t include in child theme any strings that require translation you don’t need translation files for the child theme.

    2) You can use one of the directories:
    either /wp-content/languages/themes/ or /wp-content/languages/loco/themes/ It’s ok. But don’t use /wp-content/themes/languages becasue you’ll loose translation after theme update.
    Also, after any theme update, we would recommend you to Sync translations http://prntscr.com/npu8x3

    Regards

  • Viewing 4 results - 1 through 4 (of 4 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.