Background of the issue:
I have a CPT 'Fiches pratiques' and I set it to be 'Translatable' inside WPML > Settings > Post Types Translation. I've also set a different slug for each language. My main language is 'FR'.
Symptoms:
When I view a post of this CPT, I can see the custom slug for each language. But when I go to the archive page with SEOPress Breadcrumb, I can see that the custom archive slug is not translated. It's still /en/fiches-pratiques/, /it/fiches-pratiques/.
Questions:
Where can I translate the custom archive slug for a CPT?
Thanks for contacting WPML forums support. I'll be glad to help you today.
1) Please search for the "fiches-pratiques" string in String Translation.
If that didn't help, please replicate the issue on the hidden link site and let me know to check it.
2) Could you please share your Debug information with me?
You can read a detailed explanation about it here. (http://wpml.org/faq/provide-debug-information-faster-support)
The debug info will give me much information about how your site is configured.
So when I don't set a custom archive slug inside my Post Types with MB AIO, the archive slug is translated thanks to WPML > Settings > Post Types Translation (and here we set a different translation for every slugs), but I want a plural name inside my archive page, that's why I used a custom rewrite slug in the first place,
So my slug for entry is /fiche-pratique/NAME_OF_FICHE_PRATIQUE/ and my archive post type is /fiches-pratiques/ (plural).
When I search for "fiches-pratiques" inside WPML > String Translation, I have nothing related to my custom archive slug, see screenshot
I shared my debug information of my staging website.
I created the CPT on your sandbox website.
As you can see, here is the custom archive slug for the main language (EN in your sandbox) : hidden link
And here the archive page with the 2 others languages: hidden link & hidden link
Let me know how I can have a custom archive slug which can be translated please.
For now the default slug for posts entries is working fine.
If the post type is created using PHP code, you can translate the slugs using String Translation because you would be able to wrap it with the GetText function.
I'll consult our compatibility team regarding this issue to check if we can find another workaround for it.
That's not what the page you linked is saying: "Meta Box is fully compatible with WPML."
Anyway, I contacted Meta Box team and they told me:
"If you use the builder (UI) to create the CPT, there isn't a way to translate the custom archive slug. You can create the CPT with code and translate it with WPML.
1) Thanks for your reply. Please check the attached screenshot.
2) You need to register the slug for translation in order to be able to translate it using String Translation. Kindly check the following example.
Step 1: Register the slug for translation:
// Register the custom post type slug for translation
add_action('init', 'register_custom_post_type_slug_for_translation');
function register_custom_post_type_slug_for_translation() {
if (function_exists('icl_register_string')) {
icl_register_string('Custom Post Type', 'Book Slug', 'book');
}
}