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.

This topic contains 26 replies, has 16 voices.

Last updated by nguyenT 3 years, 1 month ago.

Assigned support staff: Bruno.

Author Posts
April 30, 2014 at 3:09 pm #391185

alpaslanD

Hi,

Is there a way to translate custom taxonomy slug? I have searched on forum and found a code following:

'rewrite' => array( 'slug' => _x('my-slug', 'URL Slug', 'text_domain') ),

I have added my register_taxonomy functions this code. Then it appears on String Translation menu. But when I click the link on the front page, it redirects to 404 page so file not found.

What should I do to solve this problem?

May 1, 2014 at 12:00 am #391466

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Dear alpaslanD,

To translate the taxonomies, please click WPML > Taxonomy Translation. Find your taxonomy and translate clicking on the "translate" link.

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Thank you.

May 2, 2014 at 8:03 am #392167

alpaslanD

Thanks Bruno. I tried to do as you said. But WPML > Taxonomy Translation allows me only "taxonomy terms" slug translation. However I want to translate "taxonomy" slug translation. Please look at the following code:

// Taxonomy -> Issue (for Article post type)
// *****************************************
add_action('init', 'register_issues');

function register_issues() {
register_taxonomy( 'issues',array (
  0 => 'article',
),
array( 'hierarchical' => false,
	'label' => __('Issues', 'ajt'),
	'show_ui' => true,
	'query_var' => true,
	'show_admin_column' => true,
	'labels' => array (
            'search_items' => __('Issue', 'ajt'),
            'popular_items' => __('Popular Issues', 'ajt'),
            'all_items' => __('All Issues', 'ajt'),
            'parent_item' => __('Parent Issue', 'ajt'),
            'parent_item_colon' => __('Parent Issue:', 'ajt'),
            'edit_item' => __('Edit Issue', 'ajt'),
            'update_item' => __('Update Issue', 'ajt'),
            'add_new_item' => __('Add New Issue', 'ajt'),
            'new_item_name' => __('New Issue Name', 'ajt'),
            'separate_items_with_commas' => __('Separate issues with commas', 'ajt'),
            'add_or_remove_items' => __('Add or remove issues', 'ajt'),
            'choose_from_most_used' => __('Choose from the most used issues', 'ajt'),
          )
     ) ); 
}

With this code my permalinks looks like this both of English and Turkish: hidden link

However this is Turkish page and it should be looks like hidden link

So "issues" taxonomy slug should be translate to Turkish as "sayilar".

If I add this code into my array

rewrite' => array( 'slug' => _x('issues', 'URL Slug', 'ajt') ),

the permalinks looks correct but doesn't work and redirects to 404 page.

I hope it is explanatory for you to help me.
Thanks again.

May 5, 2014 at 12:37 pm #393607

alpaslanD

Is there a solution for this?

May 5, 2014 at 8:35 pm #394041

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Dear alpaslanD,

Sorry for the delay.

Please click on WPML > Support > Troubleshooting. Look for 'Clean up' and click on the "set language information" button.

Also, please, click on Settings > Permalinks > Save Changes. This will reset the permalinks.

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Thank you.

May 6, 2014 at 7:05 am #394249

alpaslanD

Thanks Bruno. But the result is same. I said before the custom taxonomies' slug looks correct but when clicked it goes to 404 page. Screenshots of my translation options and string translation pages has attached. Maybe these can give an idea for the solution.

May 6, 2014 at 6:53 pm #395037

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Dear alpaslanD,

I'll ask for some information so I can verify the problem. The fields for you to insert the credentials will be below its comment field.

Please let me know exactly what steps should I follow to see the problem.

Note: Please make a full backup of your site.

Thank you.

May 13, 2014 at 11:23 am #399445

alpaslanD

Thanks Bruno. I have a screen record to you verify the problem. You can download here: hidden link

Also you can review my custom taxonomy and post type codes. Download here: hidden link

May 13, 2014 at 9:09 pm #399849

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Dear alpaslanD,

Thanks for the video.

Please, click on Settings > Permalinks > Save Changes. This will reset the permalinks.

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Thank you.

May 14, 2014 at 10:19 am #400194

alpaslanD

I tried before this. But didn't work. So I have tried again now. But the result is same.
Ok, this issue is not so important for me now. Thanks for your interesting Bruno.

September 14, 2015 at 2:59 pm #703734

stephanR

I do not get that to work also. When is the "custom taxonomie slug" translation feature planned. I think it`s an important feature, with some threads leading to "not suported yet":

https://wpml.org/forums/topic/custom-taxonomy-slug-not-translating/
https://wpml.org/forums/topic/how-to-translate-a-custom-taxonomie-slug/

February 25, 2016 at 1:02 pm #823349

marioC-15

Same here, any news?

April 7, 2016 at 1:33 pm #855887

stephanR

Any News on that? It`s a really important feature I think...

April 11, 2016 at 2:37 pm #858304

Priit

+1, it really does not work...

April 28, 2016 at 11:24 am #871015

Lydie

+1