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.

Author Posts
April 3, 2019 at 12:25 pm

tomG-17

** I had to open a new ticket so I just copied and pasted it here **

Thanks for helping me out with the Multilanguage import of the WooCommerce products. Now it seems to work so I'm very happy with it.

There is one more problem I'm facing. Hopefully you are willing to help me out one more time.
I would like to translate the URL's of the attribute.

What I tried:
I went to WooCommerce --> WooCommerce Multilingual and then to Attributes.
I went to a custom attribute called "Grootte Bril". I then translated it into German, "brillengrosse". In the frontend this doesn’t seem to change anything.

hidden link

I also checked FAQ's online and some say you can change the URL's in WooCommerce Multilingual --> Save URL's. However, I don't see any custom attributes there, only common ones:

hidden link

Last but not least, I see that I'm unable to have the same url for the attribute as in Dutch (main language). For example. I would like the url to become:
DUTCH (main): hidden link (attribute + value)
GERMAN: hidden link (attribute translated + value)
When I try to give the value the same as in Dutch, it automatically changes to: /f-sterkte-1-00-de

hidden link

Hopefully you are able to help me out.
Thanks a lot!

April 3, 2019 at 1:31 pm #3526605

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hello

I´ll be helping you with the taxonomy questions.

1. Grootte Bril
You wrote: "..In the frontend this doesn’t seem to change anything."
Please send me a link where I can see this on the frontend. e.g. a Product view.

2. Custom attributes v. Global attributes
Only global attributes are translatable via Taxonomy Translation. This is because Global Attributes are ...taxonomies!
Custom attirubtes are post-meta information (e.g. custom fields) and are only translatable via Translation editor - just like any other custom field.

So, please be sure that you are referring correctly to "custom" and "global" attributes.
Regarding your question, you would not find custom attributes in the screen you shared because custom attributes are custom fields and do not have urls associated with them.

If you mis-stated the type of attribute you are using, please write back, again with a speicific case that I can view on backend/frontend.

3. Same term slugs
Indeeed, our Taxonomy Translation tool might not allow you to use the same name. But you should be able to change the slug by going to the wordpress term screen and changing it there. I just checked some of your terms and it seems that you have already done this.

The automatic addition of a language ending was supposed to have been fixed so I will need to double check this on a new installation in case it is a recurring bug.

April 3, 2019 at 2:34 pm #3527287

tomG-17

Dear Yvette,
Thanks for your quick reply. I might be mistaken. We are building our first website in WooCommerce, coming from Magento (where we use the name attribute all the time).

Let me try to explain this with an example. As you can see we sell reading glasses. For this example I would like to change the "strength" of the glasses. You can do that over here in our Dutch (main language) website:

hidden link

If you, for example click on +1.00, the link becomes

hidden link
and in German
hidden link

We want this link to become:
hidden link

This leaves me two questions:
- How do I change the "sterkte" into "starke".
- How do I remove the "de" part from the url?

Thanks again!

April 3, 2019 at 3:32 pm #3528059

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hello

1. How do I remove the "de" part from the url?
Please read this errata which answers this question more fully
https://wpml.org/errata/translated-term-slug-identical-to-the-original-term-slug/

Doing these steps I was able to change the slug in your example (see images). You will now need to do these steps for the other terms.

2. How do I change the "sterkte" into "starke".
Since this is on your "frontend", you may need to modify the code of the template so that it will retrieve the translated label of the taxonomy.
e.g. you have translated it, but your HTML is not retrieivng the translated value.

However, in my experience on your site, the taxonomy *is* appearing translated. Please see images.

If you have an example where this is not the case, please send the URL where I can see it --or-- provide navigation steps so that I can get to the forntend screen where it is appearing not-translated.

April 5, 2019 at 6:41 am #3540927

tomG-17

Hello Yvette,
Thanks again, you're a great help :)! Indeed, the "-de" behind the url is working now, thanks!

However, I still cannot find a solution to change the "sterkte" into starke". This is also not a frontend thing, because if I navigate to
hidden link
it returns a 404 error.

I have no idea how to translate that URL. When I go to WooCommerce -> Multilingual -> Attributes and select stärke, it already seems translated:
hidden link

When I go to products -> attributes and change it to the German translation, it shows German translation on the Dutch (NL) website.

hidden link

Hopefully you are able to help me.

Thanks a lot, again!

April 5, 2019 at 12:53 pm #3544375

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hello

1. hidden link
You wrote: "...it returns a 404 error..."

The format of this URL is : your_site/product_category/taxonomy_term

This archive and URL are not part of the standard Woocommerce solution. I think it may be created by the widget "Premmerce active filters" in the "Shop Sidebar" of your theme.

In this case, the problem becomes a compatibility issue with this particular feature of your theme/plugin that has created the widget.

Can you tell me more about this? Would you like to open a compatibility ticket to investigate this issue? If so, I will then provide a sandbox WPML + Woocommerce site where you can then upload the theme/plugin that delivers this widget and we can then replicate the issue and send it to our compatibility team to investigate.

2. Attribute name/slug Backend

I am always only seeing the Dutch version of the attribute name in the backend. This would be what I expect to see as the default language of your site is NL.

When you enter a translation for the attribute, you are actually translating the taxonomy LABEL and not the actual taxonomy name. This will always only exist in one language. The translation of the LABEL and the slug are done via WPML filters. In the dashboard, you are seeing what WordPress is viewing and the backend is not employing any filters like the frontend does.

NL Dashboard: hidden link
DE Dashboard:
hidden link

I hope this answers your question.

April 11, 2019 at 6:15 am #3583981

tomG-17

Good day Yvette,
Thanks again for your reply. I recorded one more video so that you'll see my problem and hopefully have a solution for that. You can check it out over here:

hidden link

Thanks a lot 🙂 !

April 11, 2019 at 9:31 am #3585693

tomG-17

Hi Yvette,

I also contacted Premmerce for this. They replied the following:
"WPML translates the filter`s URLs by Sticky Links functional if I am not mistaken.
Please check with their support "

Will this help you in any way? Thanks!

April 11, 2019 at 1:19 pm #3588117

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

The video made everything much clearer.

I took a look at the database and can see that the "rules" being used by the Premmerce filter are being stored in a proprietary table that our filters will not see.

Normally, in these kinds of cases, a bridge plugin or compability class is required to integrate the plugin features within the WPML translation architecture.

Our filters, will consult standard Wodpress / Woocommerce tables and are triggered on standard Woocommerce actions. The SEO rules that I found are not part of these tables.
Again - that does not mean that additional code could not be written to integrate the table just that it is not going to work "out of the box".

In these cases, normally we ask that you collaborate in setting up a simple example on a sandbox site that has been pre-configured with WPML and Woocommerce. At this point, we would then send the sandbox site to our compatibilty team for further work.

I am simply a "gatekeeper" in this process. My job is to ensure that all the infomration is gathered and that the issue is well udnerstood and documented. The actual solution will eventually require collaboration from the plugin authors. If a temporary workaround is found during the process, then it will be provided to you "as-is" with no futher support.

I have to remind you that sometimes no solution is ever found for various reasons. The technical complexisty may not fit the work schedules or priorirites of either the plugin author or WPML development. Or either party might find that the market demand does not justify the invested effort.

I just wanted to set a realistic expectation of what you can expect going forward. Do you wish to proceed? If so, I will prepare the sandbox site and then ask you to upload your Premmerce plugin and set up a simple rule that replicates the issue at hand.

I wait for our answer.

April 15, 2019 at 7:09 am #3610261

tomG-17

Good day Yvette,

Thanks again for your quick reply. This is all well understood and I would like to proceed together with you to find a solution for this. I will also contact premmerce if they are willing to co-operate with this.

What will be the next step for me? I have to duplicate the website I think, so you can get going? I know WPML has written a guide for that, correct? If so, can you please share that documentation url?

Thanks a lot!

April 15, 2019 at 8:35 am #3611151

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

OK.
Here is the sandbox site
One Click Login: hidden link

It h as been preconfigured with WPML + Woocommerce + WCML and some sample products duplicated to the 2nd language.

Please now upload your plugin and create the most simple case possible that will illustrate the issue you have on your site.
One rule is probably enough.

Let me know whet it is done and how to replicate the error.
Thanks!

April 17, 2019 at 8:34 am #3628521

tomG-17

Hello Yvette,
Sorry for my late reply. Premmerce wasn't willing to add the premium version on the testing environment, until now. I replicated the problem over here. I created a custom page for "Blue Clothing" in English ánd Spanish. You can do that in Premmerce -> Product filter -> SEO rules

English:
hidden link

Spanish:
hidden link

Strange enough it's not showing any products. That isn't the problem on my Shop.
As I said before I would love to be able to change (in this example) the "/filter-color-blue/" to the Spanish translation of "color" and "blue). In this case the URL has to become:

hidden link

Would love to hear from you.
Thanks so much Yvette! Your work is very much appreciated.

Tom

April 17, 2019 at 8:01 pm #3634611

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

OK - this is now escalated to our compatibility team for further work.

April 18, 2019 at 5:27 am #3636123

tomG-17

Thank you so much Yvette!

Looking forward 🙂

April 30, 2019 at 7:44 am #3708833

tomG-17

Good day Yvette,

I was wondering if there has been any updates.
Looking forward hearing from you.

Kind regards,
Tom

The topic ‘[Closed] Unable to translate (custom) attribute URL's’ is closed to new replies.