Multilingual woopress? - by nic_and_mel - on WordPress WooCommerce support

This topic has 18 replies, 3 voices, and was last updated 9 years ago ago by Eva Kemp

  • Avatar: nic_and_mel
    nic_and_mel
    Participant
    December 10, 2015 at 10:11

    Hello!

    We have our site up and running in english, but are now staring to make it in to swedish as well, since we are based in sweden. We are using wpml-plugin, with string translation and so on, and everything generic wordpress and woocommerce is working nicely. However, we have some problems with the theme options not translating, for instance the contact form is not able to translate, and we can not translate the text that we have in our custom html for header 17 and some other options as well that is based on your theme.

    Also, thinks like “new” and other labels for products and the sizing guide is not visible on the translated product pages. Why is this?

    Is there support for multi lingual site using woopress, and if so, what is the easiest way to translate the theme specific strings and texts? Or are we out of luck with this particular theme?

    Please, contact administrator
    for this information.
    17 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    December 10, 2015 at 12:42

    Hello,

    I’ve added custom_html block to String Translation http://storage7.static.itmages.com/i/15/1210/h_1449747511_5914705_5c8721698f.png .
    Now you can translate it.

    Concerning other strings to be visible in WPML settings you need do the following:
    1) add “Text Domain: woopress” in the header of style.css file in the theme directory, for example

    /*
    Theme Name: Woopress- 8theme WordPress theme
    Theme URI: https://www.8theme.com/
    Author: 8theme
    Author URI: http://themeforest.net/user/8theme
    Description: ThemeForest Premium Theme
    Version: 2.5
    License: GNU General Public License version 3.0
    License URI: http://www.gnu.org/licenses/gpl-3.0.html
    Text Domain: woopress
    */

    2) Before scanning strings in WPML > Theme and Plugins Localization you need tick
    “Automatically use theme or plugin text domains, when gettext calls does not use a string literal.”
    Then re-scan the strings.

    Best regards,
    Jack Richardson.

    Avatar: nic_and_mel
    nic_and_mel
    Participant
    December 10, 2015 at 13:40

    Hi, and thank you for the custom blocks. They worked 🙂 Now I just have a problem of the links that reset when I add the correct links in the translation…

    However, I have made all the changes, and I do find for instance the term “related products” (for related products on the product page) in the strings, but when I translate this, it does not change.

    Its a bit inconsistent. For instance the “wishlist” text changes, but not the “email to a friend” on the product page.So some strings seems to be working, and some do not change. How come?

    Any suggestions?

    Best regards
    Daniel

    Avatar: nic_and_mel
    nic_and_mel
    Participant
    December 10, 2015 at 13:45

    And one thing. I added the “Text Domain: woopress” in the style.css. I have a child theme, and in this I have since before the “Text Domain: woopress-child”.
    When I added the “Text Domain: woopress” to the style.css, the strings from the woopress-child turned up. Is this correct, or should I remove the “Text Domain: woopress” from the style.css again, since I am running the child theme?

    Best regards
    Daniel

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    December 10, 2015 at 15:06

    Hello,

    I enabled parent theme temporarily to show non-translated strings and translated “Related Products” string http://storage1.static.itmages.com/i/15/1210/h_1449756289_7230770_07e9068c4e.png
    Please check it now.

    Best regards,
    Jack Richardson.

    Avatar: nic_and_mel
    nic_and_mel
    Participant
    December 10, 2015 at 15:40

    Hi!

    It works better now but some things still do not translate, really strange.

    Do I need to enable the parent theme when doing the updates to the strings, and then disable it and enable the child theme, for this to work? I do have a few added codes to the function.php in the child theme. Do they work now?

    Or can I just leave it like this (I do the string translations to both the woopress and woopress-child and default now… maybe this is the best way to do it?

    Avatar: nic_and_mel
    nic_and_mel
    Participant
    December 10, 2015 at 15:43

    Hi again. I saw that my code from the child theme works as it is now, so then all is ok, correct?

    Best regards
    Daniel

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    December 10, 2015 at 16:23

    Hello,

    You need make translation for parent theme Woopress, so switch to it temporarily and when you finished translation you can activate child theme back.
    Code from child theme will work if child theme is activated.

    Best regards,
    Jack Richardson.

    Avatar: nic_and_mel
    nic_and_mel
    Participant
    December 11, 2015 at 10:41

    Hi, and thank you for the help. Alost done now. 3 more questions:

    1. On the translated products, there is no way to add the sizing guide (I can do this manually but it would be great if the sizing guide was transfered from the original language to the translated product)

    2. The new, out of stock badges are not visible on the translated pages/products (also, it seems like the “new” option is not used, since I have a slider with the products marked new at the start page, but on the translated start page, there are no new products (they are on the org. english page)…

    3. If I update the theme to 2.6 (I have 2.5) and wordpress to 4.4, will this break the translated strings so I have to translate them again?

    Best regards
    Daniel

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    December 11, 2015 at 17:38

    Hello,

    1. Sorry, but sizing guide image has to be added for each page manually.

    2. Your site gives “Internal Server Error”. Please check it with your hosting provider.

    3. We recommend to update the theme to 2.6 version, also update all required plugins https://www.8theme.com/download-plugins/ .
    Please keep old WordPress version as we haven’t tested it with Woopress theme yet.
    After update your translation won’t be lost.


    Don’t forget to create back up of your files and database before starting update process!

    Best regards,
    Jack Richardson.

    Avatar: nic_and_mel
    nic_and_mel
    Participant
    December 12, 2015 at 11:25

    Hello!

    Now the site should be ok (no internal server error).

    1. Regarding sizing guide, I though that since it is added to the english version it would also be available on the translated version, but does this mean I have to add it manually to the translated version even if it is already on the main language version?

    2. The site is fixed now. Do you know why the new, sold out, sale badges does not show up on products on the translated products, even if it is on the main language version? Also, the options is not used, since for instance the “new” items do not show up in the slider on the start page where we show new items (it shows up/works on the mail language part).

    You can see the translated start-page at http://www.nicandfriends.com/?lang=sv (its not yet available to the public).

    Avatar: nic_and_mel
    nic_and_mel
    Participant
    December 12, 2015 at 11:35

    Hi again!

    Sorry, I found the setting for the new badge for the translated products 🙂

    Best regards
    Daniel

    Avatar: nic_and_mel
    nic_and_mel
    Participant
    December 14, 2015 at 13:55

    Hello again!

    You added some custom strings to the site:
    “I’ve added custom_html block to String Translation http://storage7.static.itmages.com/i/15/1210/h_1449747511_5914705_5c8721698f.png .
    Now you can translate it.”

    And at first it worked (the translation showed up in the custom header). But now it does not work. The string is still there, and I have made the translation (if you check it you can see the translation). How come it does not show up on the swedish pages as it did earlier?

    Thank you for a quick reply since we are supposed to launch the swedish part today.

    Best regards
    Daniel

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    December 14, 2015 at 17:18

    Hello,

    As I see custom html block isn’t translated in String Translation:
    http://prntscr.com/9e34s3
    Please check it.

    Regarding the sizing guide image, unfortunately it has to be added for translated product too.

    Best regards,
    Jack Richardson.

    Avatar: nic_and_mel
    nic_and_mel
    Participant
    December 14, 2015 at 21:31

    Hi!

    Tanks, I was changing the wrong string. Now it works. Now I have only 2 more questions:

    1. When I add the language switcher widget from wplm to the custom block html the flags/text is on a new row below the other text (you can see this on the swedish version of the site, http://www.nicandfriends.com/?lang=sv since I have not added it to the original language yet to keep it hidden until it works). Is it possible to have everything at the same row? Or is this something I have to contact wplm about?

    2. I add a url to the string translation for custom block (as the link for the text”logga ut”, http://www.nicandfriends.com/mitt-konto/customer-logout/?lang=sv) but this link changes to the standard account link (same as for the login / register and my account) once it is saved, so it doesn’t work… How come the link I put in automatically changes to something else then what I put in?

    Avatar: Eva
    Eva Kemp
    Support staff
    December 15, 2015 at 09:27

    Hello,

    1. Please use this code in Theme Options > Custom CSS > Custom CSS for desktop:

    .header-type-17 .header-top .header-custom-block {
       width: 400px;
    }
    #lang_sel_list {
      display: inline-table;
    }

    2. This is default Woocommerce link. If you want to use other link you have to create a separate page with needed code or use some plugin for logout option.

    Regards,
    Eva Kemp.

    Avatar: nic_and_mel
    nic_and_mel
    Participant
    December 15, 2015 at 10:24

    Hello!

    1, this worked great, thank you 🙂

    2, ok, I think I understand. However, I can use the correct link in the english page, so the logout lik works there. However, when I use the swedish, translated version, id defaults back to the my-account page in swedish (mitt konto) without logging in.

    IF i use the link http://www.nicandfriends.com/mitt-konto/customer-logout/?lang=sv in the browser, I log out correctly and end up at the login/register page in swedish.

    So this link works. My question is why it defaults back to the wrong link in the string translation… I put in the link, save, and then when I reopen the translation, the link has changed. If the link would stay as it is (http://www.nicandfriends.com/mitt-konto/customer-logout/?lang=sv) then it would work…

    Avatar: Eva
    Eva Kemp
    Support staff
    December 15, 2015 at 16:55

    Hello,

    As I see in string translations for the “header_custom_block” correct link is set (screenshot http://prntscr.com/9ehkah) and here is the same link http://prntscr.com/9ehlse. Please clear browser and server cache and check the site.

    Regards,
    Eva Kemp.

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