View Categories

Set Add to Cart Button Labels per Language (WPML and Polylang)

To show different Add to Cart button text per language, use the [alg_wc_atcbl_translate] shortcode from Change Add to Cart Button Text for WooCommerce inside any label field. It works with both WPML and Polylang, and it is available in the free version.

Before you start #

  • WooCommerce, active.
  • WPML or Polylang installed and configured with your languages.
  • At least one section of the plugin enabled (for example All Products) so you have a label field to type into.

The two ways to write it #

Both forms take a comma-separated, case-insensitive list of language codes.

Attribute form (all in one tag) #

[alg_wc_atcbl_translate lang="EN,DE" lang_text="Add to cart" not_lang_text="In den Warenkorb"]

Shows lang_text when the current language is one of the listed codes, and not_lang_text otherwise.

Enclosing form (two tags) #

[alg_wc_atcbl_translate lang="EN"]Add to cart[/alg_wc_atcbl_translate][alg_wc_atcbl_translate not_lang="EN"]In den Warenkorb[/alg_wc_atcbl_translate]
  • lang="EN": the wrapped text shows only when the current language matches.
  • not_lang="EN": the wrapped text shows for every language except the listed ones.

Step-by-step #

  1. Go to WPFactory > Add to Cart Button Labels (also reachable at WooCommerce > Settings > Add to Cart Button Labels).
  2. Open the section you want (for example All Products) and enable it.
  3. In the Single product page field, paste one of the forms above with your languages and wording.
  4. Repeat for Shop page if needed, then click Save changes.
  5. Switch your site language and reload a product to confirm each label.

Tips #

  • List several languages together: lang="EN,FR,DE".
  • Use the attribute form for short labels and the enclosing form when the text contains commas or other shortcodes.
  • You can combine it with other shortcodes, for example a translated prefix plus [alg_wc_atcbl_product_price].

Get more control #

Per-language labels are free. Change Add to Cart Button Text for WooCommerce Pro adds unlimited category, tag, user role and user groups, plus on-sale labels. See what Pro unlocks.