Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Uplift › Product attribute with WPML
New Landing › How can we help? › Themeforest Theme Support › Uplift › Product attribute with WPML
- This topic has 9 replies, 3 voices, and was last updated 8 years by Rui Guerreiro – SUPPORT.
-
Posted in: Uplift
-
October 12, 2016 at 11:28 am #295944
Hi!
I’m working on translating the site using WPML (with String Translation), but can’t get my head around few things.1) Attribute on variable product page (in this case “Source Language”).
I’ve translated attribute name and terms/variables. All good in different languages on Cart and Checkout pages, where terms get translated and attribute is shown by its “Name” and gets translated in both languages.
On product page (where attribute’s variation must be chosen), the attribute isn’t shown by its “Name”, but seems to show the last part of attribute_pa_source-language.
Is it supposed to be like this or should it also be shown by “Name”? As I understand the attribute comes to product page from the uplift string “Choose a %s“.
http://www.krutstravel.com/en/shop/language-cards-indonesian/2) Quickview button text.
So far I’ve managed to translate only the text that appears in the dark box above Quickview button (on smaller screen).
I’ve translated the jckqv string “Quickview” and the uplift string “Quickview”.
The button text is the same in all languages, as it is entered Woocommerce > Quickview > Quickview Text.
http://www.krutstravel.com/poodHope you can help to point out, what or where should be done.
Thank you!
Henri the noobAttachments:
You must be logged in to view attached files.October 13, 2016 at 12:40 pm #296223Hi Henri, don’t worry – you are not a noob, WPML is fairly complex.
1) If you enable Twenty 16 theme, does this still happen? I think the issue really exists within the setup of WPML plugin.
2) That would need to be also translated in the Quickview plugin also. Take a look here: http://krutstravel.com/wp-admin/admin.php?page=wpml-string-translation%2Fmenu%2Fstring-translation.php&search=Quickview
Please contact WPML support and report this issue: https://wpml.org/forums/forum/english-support/
Thanks.
October 14, 2016 at 3:01 am #296381Hi!
1) I tried it with Twenty 16, the attribute name was shown correctly by its Name. Though the layout is a bit different there, as the attribute name is outside the selection drop-down. I also tried to deactivate all plugins besides WPML and Swift Framework while using Uplift theme, but didn’t help.
2) I have translated the string in the Quickview plugin, but it still shows the text entered in admin menu: Woocommerce > Quickview > WooCommerce Quickview Settings > Quickview Text.
The uplift string “Quickview” did good job translating text in the small dark box above button, that I mentioned before.I will also report to WPML support.
Thank you!
HenriAttachments:
You must be logged in to view attached files.October 17, 2016 at 9:48 am #296807Hi Henri,
I have had a look at the WPML backend and you seem to have it set correctly, I will need you to ask WPML about this also as I am slightly perplexed as to why the translations are not being picked up for both 1 & 2.
We work closely with WPML to make sure all our themes are compatible, so let us know what they say or if they need to contact us directly.
Thanks.
October 18, 2016 at 11:30 am #297143This reply has been marked as private.October 20, 2016 at 10:18 am #297631Hi Henri,
We can help you, the file is located here:
/themes/uplift/woocommerce/single-product/add-to-cart/variable.php
You can then search in the file for this:
$default = sprintf( __( 'Choose a %s', 'uplift'), $default_name );
and update to your needs.Thanks.
October 20, 2016 at 10:38 am #297638Thank you, I’ll give it a try.
As I understand, with this method the attribute’s name will always be the same?
For now it’s fine, but for example if I want add a second attribute “Format” to the product, so the customer can also choose “downloadable” vs “paperback”, then both attributes will show up as “Choose a source language”?Thank you!
HenriOctober 24, 2016 at 9:51 am #298220Hi,
Ok yes that would be an issue, can you see if this updated code resolved the issues: https://gist.github.com/webadelic/e499f54844c58615cf2c6344d0ee1bed.
Please install and activate the supplied child theme, inside the child theme create a folder structure like this:
/woocommerce/single-product/add-to-cart
.Inside the folder
/add-to-cart/
create a new filevariable.php
and paste in the above code.– David.
October 26, 2016 at 5:45 am #298692IT WORKS!
Thank you so much and big applause!
HenriOctober 26, 2016 at 7:44 am #298697Great. Glad it’s sorted.
Thanks David.-Rui
-
Posted in: Uplift
You must be logged in and have valid license to reply to this topic.