WPML

Get your copy from the wpml.org website

To get started, we need to enable translations for the Search & Filter post type.

Enable WPML

Once you’ve enabled WPML and setup your languages, you will notice the flags have been added to the Search & Filter admin screen:

Using WPMLs Advanced Translation Editor (ATE)

For a better translation experience, make sure to enable WPML’s Advanced Translation Editor (ATE). You can do this by navigating to WPML → Settings. Under the How to translate posts and pages section, choose Use WPML’s Advanced Translation Editor option.

Translating search forms

You can translate search forms by following the steps below:

  1. Navigate to the search form editing screen. In the language box, click the plus icon corresponding to the language you want to translate your form into. This takes you to the ATE screen.
  2. Click the Translate automatically button to translate the search form content automatically. Make sure that the translation is accurate then click the Complete button to publish the translation.

Adding a search form to a page and translating it

When translating a page that includes a form, you will only see the page content and not the search form content.

Translating pages and posts are similar to translating search forms. Check WPML’s documentation to learn more about translating your website’s content.

On the front-end, WPML automatically loads the correct language version of the form on the page.

An additional step when using shortcode to display results

This does not include when using a shortcode to display the Search Form itself

Depending on your display mode, when using the the Advanced  Translation editor you may be asked to translate your search form URL into the correct language, this will appear as a text field in the advanced translation editor.

Notes

  • WPML automatically translates tag, category, and taxonomy IDs when creating duplicates in other languages.
  • When displaying results using the Archive method, slugs can be defined individually for each language or share the same one.