WPML lets you use unique URLs for custom content in different languages. This includes translating the post slug, as well as the name of the custom post type.
On This Page:
- Getting Started
- Understanding URLs
- Translating a Post Type’s URL
- Translating the URL of a Post or Page
- Sending Post or Page Slugs to Translators
- Developer Resources
To translate page slugs, you need the String Translation add-on, which is available in the Multilingual CMS and Agency account types. Start by installing and activating the WPML core plugin and WPML String Translation add-on.
URLs for custom post types have two parts:
- Name (slug) of the custom post type
- Title (slug) of the post
Here’s an example of a custom post type’s URL in two different languages:
To translate the first part of the URL, you need to set up the custom post type to be translatable in WPML → Settings.
1. Scroll to Slug translations. Check the box to enable translation for your site’s custom post and taxonomy slugs. Click Save.
2. In the Post Types Translation section, set your custom post type to one of the Translatable options and click Save. In our example, our custom post type is Brushes.
3. After clicking Save, the option to set different slugs will appear. Click on it, and type in the translation for the custom post type slug.
4. Enter the translations and hit Save again. On the front-end, the translation for your custom post type should appear in your URL.
The second part of the URL comes from the post’s or page’s title. The translated URL will be automatically generated from the newly translated page title.
Post and Page slugs are automatically created from the title. If you want them available as slugs for your translators to translate, use these steps:
1. Go to WPML → Settings. Scroll to Translated documents options.
2. Under Page URL, choose the Translate option. Click Save.
3. After doing this, you can use WPML’s Translation Management module to send your content to translators.
If you are a developer, you can read more about manually translating slugs for custom post type archives in our Developers Information section.