This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Tagged: WooCommerce Multilingual
|March 13, 2019 at 10:48 am #3332179|
This time I want to bring to your attention a very complicated issue. At least in my opinion. I trust you cracks will solve it easily.
In the site, I’m developing I will try to sell digital photos.
There are three license types:
The license types are coming from the image metadata.
These license types are shown on the single product page so the customer knows what license type is applicable.
For each license type, there is a short text about what the license means.
(See the front-end screenshot)
Those clarifying texts are hardcoded in a custom plugin. All translatable coded.
I have created a custom field, type select (with a dropdown menu) with the options (you can guess it) Commercial, Editorial and Rights-managed. I use this code for it:
woocommerce_wp_select( array( // Text Field type 'id' => '_license_type', 'label' => __( 'License type', 'trusted_pro_child' ), 'description' => __( 'Select the license type here', 'trusted_pro_child' ), 'desc_tip' => true, 'options' => array( '' => __( 'Select license type', 'trusted_pro_child' ), 'Commercial' => __('Commercial', 'trusted_pro_child' ), 'Editorial' => __('Editorial', 'trusted_pro_child' ), 'Rights managed' => __('Rights managed', 'trusted_pro_child' ), ) ) );
First thing I noticed is that I’m not able to translate the Options in String translation (even not when I scan the theme for strings. How come?)
Next: I want to treat those license types in the way tags are managed, once known don’t bother to display it in the product translation screen (WooCommerce Multilingual) because it is already known.
I try to set the custom field to translatable and that went ok (in a way).
I want to achieve that :
Want more info? Just ask.
|March 14, 2019 at 8:49 am #3341547|
Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )
Timezone: Europe/Rome (GMT+02:00)
thanks for contacting us.
I see you are using PODS plugin, the code you wrote is in some way related to this plugin or is all custom code? Could you replicate the issue here? hidden link
|March 14, 2019 at 1:07 pm #3344773|
My issue is resolved now. Thank you!