To translate related categories with WPML or Polylang in Related Categories for WooCommerce, use the [alg_wc_related_categories_translate] shortcode in the Header or Custom templates under Template Options at WPFactory > Related Categories. For manually related categories, set the Multi-language option on the Advanced sub-tab to WPML or Polylang.
Translate the heading and labels #
Use the [alg_wc_related_categories_translate] shortcode inside the Header or Custom templates to output text for the active language. Find the templates under Template Options at WPFactory > Related Categories (also reachable at WooCommerce > Settings > Related Categories).
Attribute form:
[alg_wc_related_categories_translate lang="DE" lang_text="Verwandte Kategorien" not_lang_text="Related categories"]
Wrapping form, combining two calls so each language gets its own text:
[alg_wc_related_categories_translate lang="DE"]Verwandte Kategorien[/alg_wc_related_categories_translate][alg_wc_related_categories_translate not_lang="DE"]Related categories[/alg_wc_related_categories_translate]
lang shows the text only for the listed languages; not_lang shows it for every language except those listed. Both accept a comma-separated list of language codes.
Resolve manual relations to the default language #
When you hand-pick related categories in Pro (Per category, Per tag, Per custom taxonomy or Per product), the categories are stored against the default-language product or term. So visitors on a translated page get the same relations, set the Multi-language option on the Advanced sub-tab.
| Label | Option ID | Choices | Default |
|---|---|---|---|
| Multi-language | alg_wc_related_categories_multi_language |
Disabled, WPML, Polylang | Disabled |
Set it to WPML or Polylang to match your translation plugin. It tells Related Categories to use the default-language product or term ID when reading the Per category, Per tag, Per custom taxonomy and Per product relations, so you assign categories once and they carry across languages.
Get more control #
The translation shortcode and multi-language handling are free. Hand-picked related categories (the relations this option maps across languages) are part of Related Categories for WooCommerce Pro. See what Pro unlocks.