Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I am unable to add any translations to my product variation, however the ProductVariation entity class has an annotation of translatable = True.
Is this a bug or am i missing somthing here?
Comments
Comment #2
bojanz CreditAttribution: bojanz at Centarro commentedWe need to fix IEF first #2494959: Add translation integration. The ideal UX is for variations to be translated when the main product is translated.
Comment #3
agoradesign CreditAttribution: agoradesign commented@powysm
The reason, why the one entity type is acknowledged as translatable but the other not, is that product entities have a canonical link template, variations not. Theses entity types must set 'content_translation_ui_skip' TRUE in order to be translatable too. read more at https://api.drupal.org/api/drupal/core%21modules%21content_translation%2...
Comment #4
agoradesign CreditAttribution: agoradesign commentedimho it does make sense to enable translations, even before IEF is fixed. E.g. I'm importing all products from XML. It's more important to me to have a working import than a working UI.
Additionally, #2494959: Add translation integration does contain a working patch, that can be used in the meantime.
For everyone, that want to enable the translations of variations, here's a workaround that does not need a patch to Commerce files. Just implement the following function in a custom module:
Comment #5
bojanz CreditAttribution: bojanz at Centarro commentedThe IEF issue is done.
Time to implement the Commerce side:
1) content_translation_ui_skip on the variation annotation
2) make the SKU non-translatable
3) Add code that ensures the product variations are loaded in the same language as the product itself. Same with stores, for consistency.
Comment #7
bojanz CreditAttribution: bojanz at Centarro commentedWelcome to the shiny, translatable future :)