public function onBeforeWrite()
    {
        /** @var string $currentLocale */
        $currentLocale = FluentState::singleton()->getLocale();
        if (!$currentLocale) {
            return;
        }

        // If the record is not versioned, force change
        if (!$this->owner->hasExtension(FluentVersionedExtension::class)) {
            $this->owner->forceChange();
            return;
        }

        // Force a change if the record doesn't already exist in the current locale
        if (!$this->owner->existsInLocale($currentLocale)) {
            $this->owner->forceChange();
        }
    }