Please make sure to update to WPML 4.3.6 and check our list of Known Issues before reporting

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Our next available supporter will start replying to tickets in about 10.28 hours from now. Thank you for your understanding.

This topic contains 7 replies, has 4 voices.

Last updated by Rudy 4 years, 5 months ago.

Assigned support staff: Ankit.

Author Posts
August 10, 2015 at 6:25 pm #676695

Patrick

Hello,

There has been a post about this at least once per year since 2012[1], but I can't actually find one from this year, so I'm posting this again.

The problem is simply that custom post type archive slugs cannot be translated. I'm thinking that this would be a logical place to put it, along with that translation for custom post type slugs: hidden link

This can, of course, be found in WPML > Translation Management > Multilingual Content Setup

Is there any update on this bug?

Thank you!

[1] 2012: https://wpml.org/forums/topic/rewrite-slug-not-supported-for-my-cpt/
2013: https://wpml.org/forums/topic/custom-post-type-archive-slug-translation-2/
2014: https://wpml.org/forums/topic/translating-custom-post-archive-slug/

August 12, 2015 at 7:38 am #677805

Ankit

Hi Patrick,

Thank you for contacting wpml support.

1. Can you please elaborate your question little more to allow me understand better?

You can translate the post type archive slug from WPML > Translation Management > Multilingual content setup > Custom Posts, for more information, please check: https://wpml.org/documentation/getting-started-guide/translating-page-slugs/ go to "Enabling Custom-Post-Type Name Localization in WPML
" section.

2. If you are registering CPT and putting CPT slug different from CPT archive slug by setting has_archive parameter as some string, then curently wpml do not translate archive slug of the CPT, it can only translate the CPT slug.

Hope this helps.

Regards
Ankit

August 12, 2015 at 3:35 pm #678200

Patrick

Hello Ankit,

I'm sorry, but no: that didn't help. Your point 1 is basically a restatement of my the facts from my question. With your restatement and with the three links from the three previous years, I think my question is clear now?

Point 2 is more to the point. I am wanting to translate the CPT *archive* slug which is not the same as the CPT slug. It appears WPML doesn't do this, despite the fact that people have been asking for it for 4 consecutive years now. Is there any ETA for this? It seems like a pretty basic and necessary feature. At least, would you have a work-around while we wait for the bug-fix? Because in 2014, according to Bruno, it was classified as a bug and sent to the developers. But the bug is still there a year later.

Thank you.

August 13, 2015 at 6:38 am #678545

Ankit

Hi Patrick,

Unfortunately the archive slug can be translated (If it is different from post type slug), also we do not have any workaround for this at the moment. As mentioned here: https://wpml.org/documentation/getting-started-guide/translating-page-slugs/, This is however, on our “To Do” list to support at some point, but we currently do not have any ETA for this.

Sorry for inconvinience.

Regards
Ankit

August 13, 2015 at 4:46 pm #679114

Patrick

Hi Ankit,

Thanks for the reply. I'm going to mark this as resolved despite the fact that it isn't. For the record, for whoever finds this in 2016, WPML said the feature is coming "soon": hidden link Of course, if the feature comes out before 2016, that would be aweseome.

Thanks again.

April 1, 2016 at 7:57 am #850820

Alen

Any update available?

May 25, 2016 at 10:11 am #889921

Rudy

Working with WPML & SEO Yoast, as a workaround I finally used Yoast wpseo_title filter and some WP conditional tags to display my own Pages Titles, using PO/MO files for translations... works like a charm and maybe more efficient regarding performances ?

May 25, 2016 at 10:20 am #889930

Rudy

Ah sorry, you were talking about page URLs (not titles)... my bad!

Anyway, I could also achieved custom-translated Slugs for each post-types, adding some rewrite rules for each one...

For example :

// French
add_rewrite_rule('produits/([^/]*)/?','index.php?cpt-product=$matches[1]','top');
add_rewrite_rule('produits','index.php?post_type=cpt-product','top');
// English
add_rewrite_rule('products/([^/]*)/?','index.php?cpt-product=$matches[1]','top');
add_rewrite_rule('products','index.php?post_type=cpt-product','top');

Then, I used the post_type_link filter to update all links depending on Post type & language...

Hope this helps 😉