Docs

Using the Portal with WPML

4 min readUpdated October 31, 2026

WC Account Portal works with WPML out of the box: the portal follows the visitor’s current language, mirrors itself for RTL languages, signs customers out to the home page of their language, and registers your own texts with WPML String Translation. You can translate those texts in WPML or in the plugin’s own language panels, whichever fits your workflow.

What happens automatically#

With WPML active, you do not need to set anything:

WhatHow it works
Plugin textThe plugin’s translation file is loaded for WPML’s current language (using the wpml_locale filter), after WPML has switched the language. Menu names, buttons and the login page show in the visitor’s language.
Language detectionThe current and default language come from the wpml_current_language and wpml_default_language filters.
RTLWhen the current language code is ar, he, fa, ur, yi, ps, sd, ku, ckb or dv, the portal switches to right-to-left.
Language buttons in the settingsThe languages on Content & Text, Translations and Pages come from WPML’s active languages (wpml_active_languages), without the default language.
Sign outIn a language other than the default, the sign-out link is /{language}/logout/ (for example /fr/logout/). After signing out, the customer goes to the home page of that language (wpml_home_url). In the default language the link is /logout/.

Texts registered with WPML String Translation#

The plugin registers your own texts with WPML String Translation (wpml_register_single_string), in the domain wc-account-portal. You need the WPML String Translation add-on for this part.

Settings texts#

WPML string nameField in the plugin
setting_portal_page_titlePortal Page Title
setting_welcome_titleWelcome Title
setting_welcome_messageWelcome Message
setting_auth_taglineAuth Page Tagline
setting_announcement_textAnnouncement
setting_dash_help_titleDashboard > Help & contact > Title
setting_dash_help_textDashboard > Help & contact > Message
setting_dash_help_link_labelDashboard > Help & contact > Link text
setting_dash_custom_titleDashboard > Custom content > Title
setting_dash_custom_contentDashboard > Custom content > Content

All ten are registered when you save Content & Text, except the ones that are empty: an empty text has nothing to translate, so it is not added to WPML’s list. Fill in the field and save again to register it. The five Dashboard texts are also registered when you save the Dashboard tab.

Every account menu item with a label is registered as menu_label_{item id} when you save Menu Items, for example menu_label_orders, menu_label_downloads or menu_label_edit-address.

What is not registered#

  • The Portal UI Strings (the “Back to [site]” link, Sign out, Light mode, Dark mode): they come from the plugin’s translation files, or from the Translations tab.
  • Your own account pages from the Pages tab: translate their title and content on the Pages tab with the language buttons.
  • Any other setting (colours, links, email and phone in Help & contact).

Translate in WPML String Translation#

  1. With WPML and WPML String Translation active, save each of these tabs once: WooCommerce > Account Portal > Content & Text, Dashboard and Menu Items. Saving is what registers the strings, so do this again after you install WPML on a site that already has a setup.
  2. Go to WPML > String Translation.
  3. In Select strings within domain, choose wc-account-portal.
  4. Click the translate button next to a string, type the translation for each language and save it.
  5. Open your account page in that language to check.
Warning

The plugin’s own translation wins. If a field for that language is filled on Content & Text or Translations (also by Fill in built-in translations), the portal shows that and not WPML’s. To use WPML String Translation for a text, leave the plugin’s field for that language empty.

The order the portal checks, per text#

For a visitor in a language other than the default:

  1. The plugin’s own translation for that language (Content & Text / Translations).
  2. WPML String Translation (wpml_translate_single_string, the strings listed above).
  3. The original text. If it is still the plugin’s English default, the built-in translation is shown.

Which way to choose#

  • Plugin language panels: everything on one page, side by side with the original, with Fill in built-in translations. Includes the Portal UI Strings. Copied with Export / Import.
  • WPML String Translation: fits a team that already translates everything in WPML, or uses WPML’s translation services. Translations live in WPML, so they are not in the plugin’s export file.

You can mix them: for example, fill the menu labels with the built-in translations and send the welcome message through WPML.

Polylang#

Polylang is supported for the language itself: the current language and default language, the plugin’s translation file per language, RTL detection, the language buttons in the settings and the /{language}/logout/ sign-out link. The plugin does not register strings with Polylang, so with Polylang translate your texts on Content & Text, Translations and Pages.

Share:

Was this helpful?