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.
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.