Skip Navigation
Updated
May 17, 2024

WPML lets you translate URL slugs into different languages. This includes translating slugs for pages, posts, custom post types, and taxonomies.

On this page

What is a URL slug?

A URL slug is the part of a URL that identifies a specific page on a website. Both search engines and users rely on slugs to understand the topic of a page, so it’s important to make them clear and easy to read. 

URL with custom post type and page title slugs
URL with custom post type and page title slugs

Translate URL Slugs with WPML

WPML can easily translate any URL slug. This includes pages, posts, custom post types, and taxonomies. 

To translate URL slugs with WPML, you need to install and activate WPML and String Translation.

Translate URL Slugs for Custom Post Types

To translate URL slugs for custom post types with WPML:

1. Go to WPMLSettings and scroll down to Slug translations.

2. Check the box to enable custom post type and taxonomy slug translations. Click Save.

Enabling translation of custom post and taxonomy base slugs
Enabling translation of custom post and taxonomy base slugs

3. In the Post Types Translation section, set your custom post type to Translatable only show translated items and click Save. In our example, our custom post type is Brushes.

Setting the custom post type to one of the translatable options

4.  The option to set different slugs appears. Click it, type in your translation for the custom post type slug, and hit Save again.

Translating slugs for custom post types
Translating slugs for custom post types

On the front-end, the translation for your custom post type should appear in your URL.

Viewing the translated custom post type in the URL
Viewing the translated custom post type in the URL

Translate Page and Post URL Slugs

By default, when you send pages and posts for translation, WPML automatically translates their URL slugs using the title. 

For example, a page titled – Best Vacation Destinations in Summer, has the following URL: 

www.example.com/best-vacation-destinations-in-summer/

When translated into Spanish, WPML will use the new page title – Mejores Destinos de Vacaciones en Verano, to automatically create the URL slug: 

www.example.com/es/mejores-destinos-de-vacaciones-en-verano/

If you want more control, you can translate the slugs by yourself or send them to your translators:

  1. Go to WPML → Settings. Scroll to Translated documents options.
  2. Under Page URL, choose the Translate option. Click Save.
Setting the option to Translate the page URL

Now, when you send a new page for translation and open the job in the Advanced Translation Editor, you’ll see the URL slug automatically translated. You can review and adjust the translation as needed.

Translating the page URL slug in the Advanced Translation Editor

Translate Taxonomy URL Slugs

To translate taxonomy URL slugs, follow our taxonomy translation guide

Developer Resources

If you are a developer, you can read more about manually translating slugs for custom post type archives in our Developers Information section.

Get Started with WPML

To translate URL slugs with WPML, you need the Multilingual CMS or Multilingual Agency account type. Visit our pricing page to compare plans and learn more about WPML’s features.