Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client was experiencing two issues on their bilingual website with English (EN) as the main language and Bahasa Malaysia (MS) as the secondary language. The first issue was with custom taxonomy slugs not translating correctly in URLs, and the second issue was with ACF gallery images not displaying in the MS language.

Solution:
For the first issue:
1. Navigate to WPML -> String Translation.
2. Search for the slug and delete it.
3. Go to Settings -> Permalinks, and resave the page.
4. Clear the site's cache.
5. Go to WPML -> Settings -> Taxonomies Translation section.
6. Translate the slug.

Additionally, the supporter found that the "Taxonomies (acf-taxonomy)" post type was set to be translatable in WPML -> Settings -> Post Type Translation, so they set it to be not translatable and deleted the translated taxonomy posts. The client was advised to translate a taxonomy term and a post belonging to this term and then check the issue on this newly translated term.

Please note that the solution provided might be irrelevant due to being outdated or not applicable to your case. If the issue persists, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket with us.

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.

Tagged: 

This topic contains 12 replies, has 2 voices.

Last updated by Osama Mersal 1 year, 2 months ago.

Assisted by: Osama Mersal.

Author Posts
March 16, 2024 at 2:06 pm #15416828
eugeneTeo

In my website, I'm using English (EN) as the main language and Bahasa Malaysia (MS) as the secondary. I've followed everything from this link to translate the CPT and Taxonomy names and slugs accordingly https://wpml.org/documentation/getting-started-guide/translating-post-categories-and-custom-taxonomies/. I'm using the setting "Translatable" but tse translation if available or fallback to default language all the custom posts and custom taxonomy. However, I'm experiencing 2 issues right now:

#1a. I have a custom taxonomy for posts called "Writers" and "writer" for its slug. In MS, it is translated to "Penulis" and "penulis" respectively. However, all links are not showing the correct translated slug, even from WPML language menu switching. Oddly enough, if I directly replaced "writer" to "penulis" in the URL, the link works, although the taxonomy name is still incorrectly showing the English version.
#1b. The same is happening when I have a Category term in the URL base. The Category term slug is "articles", translated to "artikel". However, when I'm in the MS language archive, the link is incorrectly showing as "articles" instead or "artikel". However, if I'm on a EN language blog post, then switch to the MS language from WPML language menu, the slug is correctly showing as "artikel".

I don't have any issue translating CPT name and slugs, just experiencing issues translating Taxonomies

#2. On a CPT, I have a ACF gallery image. I can get all the images ID correctly in the EN language in the single post, but in the MS language, I get no images. However, all other text custom fields can be shown correctly.

New threads created by Osama Mersal and linked to this one are listed below:

https://wpml.org/forums/topic/cant-get-images-from-acf-gallery/

March 17, 2024 at 11:41 am #15418273

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

1) Please try the following steps:

1- Go to WPML-> String Translation
2- Search for the slug and delete it
3- Go to Settings-> Permalinks, and resave the page
4- Clear the site's cache
5- Go to WPML-> Settings-> Taxonomies Translation section
6- Translate the slug

2) We try to keep one issue per ticket in our forum. Continuing with one ticket per issue helps supporters focus on one issue at once and enables other users to find solutions to their questions faster.

Therefore, I've split the other issue and created a new ticket with this issue. (https://wpml.org/forums/topic/cant-get-images-from-acf-gallery/)

Best regards,
Osama

March 21, 2024 at 1:36 am #15434098

eugeneTeo

Hi.

I tried the steps, twice, and the slug and the Taxonomy name is still using the primary language.

This part still works: if I directly replaced "writer" to "penulis" in the URL, the link works but the taxonomy name is still incorrectly showing in English .

P/S: I'm using ACF Pro to create the Taxonomies.

March 21, 2024 at 11:12 am #15435846

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for your update. Could you please check if the issue persists in a minimal environment by following these steps?

1- Deactivate all the plugins except WPML CMS, String Translation, ACF, and ACF Multilingual.
2- Switch to a WordPress default theme like Twenty Twenty-one.

If the issue is gone, activate them one by one to see which one is causing an interaction issue.

❌ Please backup your database before performing the above test ❌

Best regards,
Osama

March 27, 2024 at 3:39 pm #15456901

eugeneTeo

Hi, I can't disable the theme as we are using Bricks Builder and displaying those ACF values via the templates.

I did try to deactivate and reactivate every plugin but nothing seems to work.

I've already given the login details in the other thread, if that will help?

March 27, 2024 at 3:48 pm #15456931

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

I checked the Taxnomies and found that the "Taxonomies (acf-taxonomy)" post type was set to be translatable in WPML-> Settings-> Post Type Translation, so I set it to be not translatable.

Also, I deleted the translated taxonomies posts. (hidden link)

Please translate a taxonomy term and a post belonging to this term. (hidden link)

After that, please check the issue on this newly translated term.

Best regards,
Osama

March 27, 2024 at 4:00 pm #15457070

eugeneTeo

I'm not looking to translate a term but the taxonomy's name and slug.

Tax name: Writer
Tax slug: writer

EN:
hidden link

How I want MS to be:
hidden link

But the link is showing as below and the title is still "Writer":
hidden link

March 27, 2024 at 4:10 pm #15457111

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

I translated a writer's term. Please check this writer and use the language switcher to switch to MS. (hidden link)

Best regards,
Osama

March 27, 2024 at 4:25 pm #15457190

eugeneTeo

I'm confused. Does this mean I must translate a term in order to have the correct taxonomy's slug displayed as "penulis"?

I was expecting it to work similar to CPT, where the secondary language will use the translated CPT name and slug, but if the CPT post does not have a translated content, it will fallback to its primary language content and slug.

Example:

EN:
hidden link

MS:
hidden link

Theater's slug is translated to "teater", but the post's slug comes from the EN version.

Can't the taxonomy translation work like CPT in this way?

March 27, 2024 at 5:06 pm #15457501

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

The taxonomy terms should be translated for the slug to work correctly. It doesn't work the same as post types.

Best regards,
Osama

March 27, 2024 at 5:09 pm #15457527

eugeneTeo

It is strange then that I can still use the translated slug manually as mentioned in my first post. I would have thought that it might have been some misconfiguration or something.

Example:
hidden link
hidden link

Why is it so?

March 27, 2024 at 5:11 pm #15457550

eugeneTeo

Also, if it doesn't work the same way as CPT, what does the "Translatable and fallback" setting for Taxonomy translation do in WPML do then?

tax-translation.png
March 27, 2024 at 5:25 pm #15457646

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

The taxonomy slug acts differently than the post-type slug. You can test that on an empty WordPress installation.

The fallback in the taxonomies allows you to change the language. If you select other translation preferences, you won't see the language switcher to switch to other languages.

Best regards,
Osama

April 3, 2024 at 7:03 pm #15480173

eugeneTeo

I guess there's no way to work around this. I've managed to resolve the issue for the Taxonomy label as well. So consider this resolved.