Home » Documentation » Getting Started Guide » Translating Post Categories and Custom taxonomies

Translating Post Categories and Custom taxonomies

WordPress comes with a powerful taxonomy system, including post categories and tags as well as user-defined taxonomies, for example for portfolio categories or product attributes in ecommerce-sites.

WPML makes it easy to translate these taxonomies. We consider only the case of product categories, but any taxonomy registered with WordPress has a similar interface. You can translate taxonomy individually, from the taxonomy edit screens, or centrally.

Translating taxonomy using the Taxonomy Edit screens

Go to Posts->Categories to define a few categories. The ‘Add New Category’ panel to the left of this page has a frozen dropdown at the bottom to show the language of the new category, looking like this, depending whether you try to add the new category in your site’s default language or in a different active language:

In the default language

In the default language

In another active language

In another active language

To change the language of new categories, you select the one you want in the admin bar:

Change the language of new categories

Change the language of new categories

The right panel shows the categories you have defined for a selected language:

Post categories

Post categories

Click on the category name you want to translate, say ‘Design’. This will take you to the ‘Edit Category’ page for ‘Design’. At the bottom of the page you’ll see:

Adding the translation of a category

Adding the translation of a category

Click on ‘add’ for one of the languages. This will take you back to the Categories page, with its ‘Add new category’ panel to the left. We show the top and bottom parts of this panel:

Add new translated category (top)

Add new translated category (top)

Add translated category panel (bottom)

Add translated category panel (bottom)

If you now go to the edit category page for ‘Design’, you see that the bottom box has changed:

Category translations

Category translations

Whereas if you edit one of the translated categories, its bottom box looks like this:

Translated category edit page

Translated category edit page

You can see the correct selected value in the dropdown ‘this is a translation of’. The dropdown in fact allows you to choose the value from any of the untranslated categories in your site’s default language, so you can add as many categories as you want in any language and then select later what they are translations of.

Central translation for all taxonomy terms

WPML provides a central interface, which lets you quickly translate all categories, tags and custom taxonomy in your site.

Go to WPML->Taxonomy Translation.

Taxonomy translation

Taxonomy translation

At the top of the page you will find a drop-down menu, which lets you select what taxonomy to translate.

Once selected, you can translate the taxonomy terms and the labels for the taxonomy. The terms are the actual tags and categories in your site. The labels are how the taxonomy names are displayed on the site.

After you translate taxonomy, you can apply the newly translated terms to existing content. This will automatically synchronize between the content in the default language and all translated content. The translated content will be associated to the corresponding translated taxonomy, similarly to that of the default-language content.

Synchronizing Hierarchical Taxonomies

As a site grows there may be times when there is a need for the taxonomy hierarchy to change to accommodate the new content. Site admins usually make hierarchy changes to the taxonomy tree in one language and want the other languages adjust automatically.

As of WPML 3.2 you will find a new tab on the “Taxonomy Translation” admin screen called “Synchronize Hierarchy”.

taxonomy hierarchy synchronization

Taxonomy hierarchy sync in WPML 3.2

The tab will display taxonomy terms for synchronization when there is something to synchronize. Otherwise, it will display a message informing you that the “Taxonomy hierarchy sync is complete”