Account created on 14 September 2020, over 4 years ago
#

Merge Requests

Recent comments

πŸ‡§πŸ‡ͺBelgium Tom_VDB

Tom_VDB β†’ made their first commit to this issue’s fork.

πŸ‡§πŸ‡ͺBelgium Tom_VDB

Multilingual works only if both the node and the paragraph are translatable.
Can you confirm it is set up like this?

Let me know if you have any issues.

πŸ‡§πŸ‡ͺBelgium Tom_VDB

Tom_VDB β†’ made their first commit to this issue’s fork.

πŸ‡§πŸ‡ͺBelgium Tom_VDB

Tom_VDB β†’ changed the visibility of the branch 2.1.x to hidden.

πŸ‡§πŸ‡ͺBelgium Tom_VDB

I have picked up maintaining this module.

πŸ‡§πŸ‡ͺBelgium Tom_VDB

I needed the language the user used to create the order.
I resorted to enabling the langcode field on commerce_order.

In a custom module:

function example_entity_type_build(array &$entity_types) {
  $keys = $entity_types['commerce_order']->getKeys();
  $keys['langcode'] = 'langcode';
  $entity_types['commerce_order']->set('entity_keys', $keys);
}
use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\Core\StringTranslation\TranslatableMarkup;

/**
 * Add 'langcode' to 'commerce_order'.
 */
function example_update_8001() {
  $storage_definition = BaseFieldDefinition::create('language')
    ->setLabel(new TranslatableMarkup('Language'))
    ->setDisplayOptions('view', [
      'region' => 'hidden',
    ])
    ->setDisplayOptions('form', [
      'type' => 'language_select',
      'weight' => 2,
    ]);

  \Drupal::entityDefinitionUpdateManager()->installFieldStorageDefinition('langcode', 'commerce_order', 'commerce_order', $storage_definition);
}

This hold the current langcode when the order is first created.
After which it is accessible with $order->langcode()

Production build 0.71.5 2024