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.

This topic contains 1 reply, has 2 voices.

Last updated by Andreas Neuber 6 years, 9 months ago.

Assigned support staff: Andreas Neuber.

Author Posts
September 18, 2013 at 10:06 am #265650

daniel

hello
in my theme i use a woocommerce shortcode : do_shortcode( '[add_to_cart id="' . $lid . '"]')

but i can't find the string translation for this ? i there a way of translating it or i should do something else ?
thx

September 18, 2013 at 10:43 am #265672

Andreas Neuber
Supporter

Languages: English (English ) German (Deutsch )

Hello Daniel,

What you should do in any case is to adjust the shortcode to this:

do_shortcode( '[add_to_cart id="' . icl_object_id($lid, 'product', true) . '"]');

Our API function will calculate the ID for the translated product.

Could you rescan the theme 1x more time via "WPML > Theme and plugins localization > Strings in the Theme" and check "WPML > String-Translation" again?
It should appear with context "woocommerce".

The topic ‘[Closed] translate add to cart shortcode’ is closed to new replies.