code: public function handleDecode(DecodePropertyValueForWidgetEvent $event)
      {
          if (!$this->wantToHandle($event) || ($event->getProperty() !== 'languages')) {
              return;
          }
  
          $langValues = (array) $event->getValue();
          $output     = [];
          foreach ($langValues as $langCode => $subValue) {
              if (is_array($subValue)) {
                  $output[] = array_merge($subValue, ['langcode' => $langCode]);
              }
          }
  
          $event->setValue($output);
      }
docs: Decode a language array.
  
  @param DecodePropertyValueForWidgetEvent $event The event.
  
  @return void