Profile picture for user admin
Daniel Sipos
13 Jan 2014

This is a short tutorial on enabling Drupal Commerce product entities to be translated using the Entity Translation module in Commerce Kickstart.

As you know, Drupal can be quite frustrating at times when it comes to translation. You have some core stuff available that if coupled with some contrib solutions will get you going but it will never be perfect. At least not so easy. And if you are working with something as complex and custom as Drupal Commerce, things get more difficult, fast.

Today I want to share with you my experience with enabling product entities to be translated with Entity Translation in the Commerce Kickstart distro. Let's say your Product Displays are translatable already (either using core and the i18n package or with Entity Translation) but the products are not. What do you do?

Well first you need to go to admin/config/regional/entity_translation and enable Commerce Product under the Translatable Entities list. Then - and if you've been searching the internets and reached here desperate for a solution - you have to edit the product type you want translatable (at admin/commerce/products/types) and check the radio Enabled via Entity translation. You know, like with regular content types.

But wait a minute. There is no such thing. You are seeing nowhere product types and this URL throws a 404 error. There are product variations, but no multilingual options when you edit product variation types. So wtf is going? You are using Commerce Kickstart - that's what's going on. And Commerce Kickstart comes with Commerce Backoffice that for ease of use and whatnot removes the product type UI and replaces it with product variations - among other things of course.

So what do you do? Go ahead and disable the module Commerce Backoffice Product. Clear the cache. Then go back to that URL (admin/commerce/products/types), edit the product type you want (remember, the product type is the variation you had before) and you will find upon that multilingual setting you couldn't find. Save the product type and your product entities of that type are now translatable.

You can then edit the individual fields on the product type/variation and enable translation. And this includes the title as well if you are using the Title module (which Commerce Kickstart should). This was in fact my need. The product displays where translated but the product entity titles were not. So in my cart, the line items were referencing the product entity title and not that of the display. Translating the product entity title therefore solved my problem.

Now if you want to go back to the way it was - using product variations and the old UI - which I prefered actually, re-enable the Commerce Backoffice Product module and clear the cache a couple of times. I had to wait a bit before everything reverted properly, but it did nonetheless. So if you don't get back your variations instantly, don't fret, they'll come soon.

OK, so hope this helps.

Profile picture for user admin

Daniel Sipos

CEO @ Web Omelette

Danny founded WEBOMELETTE in 2012 as a passion project, mostly writing about Drupal problems he faced day to day, as well as about new technologies and things that he thought other developers would find useful. Now he now manages a team of developers and designers, delivering quality products that make businesses successful.

Contact us

Comments

Calvin Scharffs 17 Jan 2014 23:01

Translation Help!

Danny would love to introduce you to the Lingotek Translation module. It is a super easy way to configure translation in Drupal and in fact we are bundled in the Commerce Kickstart distribution. We enable you to translate content in real time with machine translation integration or you can translate the pages yourself. You can also use our professional translation services group if you need help with that as well. You can learn more here https://drupal.org/project/lingotek

greenbie 17 Feb 2014 22:53

diff experience with kickstart and translation

kickstart 2.12, entity translation and i18n modules enabled.
All seems to work preliminary, except translating taxanomy term.
I checked taxonomy term under entity translation, but when I tried to translate taxonomy term, it said " no translatable fields". Tried enabling taxonomy translation module. No help.
The only work around so far is menu translation. However, I still have 2 places where term is not translated? http://i60.tinypic.com/2v80m6s.jpg Any idea why " no translatable fields" . And how to resolve the 2 places where term is not translated?

One other question:
how to translate image alt and title fields? I already enable translation with Images under Product Variation/Manage Fields.

Cosa 02 Apr 2014 15:14

Hi! If you're interested in

Hi! If you're interested in translating Drupal, have a look at the online translation platform https://poeditor.com/
It's one of the best software localizaiton solutions out there.

Fred 25 Apr 2014 01:39

BIG HUGS!

Titles are working correctly. But not the bodies...

"Now if you want to go back to the way it was - using product variations and the old UI - which I prefered actually, re-enable the Commerce Backoffice Product module and clear the cache a couple of times. I had to wait a bit before everything reverted properly, but it did nonetheless. So if you don't get back your variations instantly, don't fret, they'll come soon. - See more at: http://www.webomelette.com/translate-drupal-commerce-product-entities-types-and-variations#sthash.kCQCnSEg.dpuf"

I LOVE YOU :-) MANY THANKS!!!!

Dmitry 24 May 2015 13:17

New module for translation

Also you can try to use the follow module: https://www.drupal.org/project/i18n_commerce_product

freshpure 18 Feb 2016 16:28

Thanks for this post....

Thanks, this just totally saved my life after searching Google for hours... and even posting about it for the first time ever on a blog (http://freshpure.tumblr.com/). Dmitry's i18n_commerce_product did not work either.

Does this mean that I will need to enable/disable the "Commerce Backoffice Product" each time I need to translate?

Shruti 09 Aug 2019 12:20

Content translation for commerce promotion

Hi,
I am able to enable content translation for commerce products but for commerce promotion its showing not supported. How to enable content translation for Promotion module ?

Add new comment