Jump to content

[SOLVED] How to copy title in multi language?


Recommended Posts


Example in ready.php:

    function (HookEvent $event): void {

        /** @var Page $page */
        $page = $event->arguments(0);

        $default = wire()->languages->get("default");
        $english = wire()->languages->get("english");


        /** @var LanguagesPageFieldValue $field */
        $field = $page->title;
        $defaultTitle = $field->getLanguageValue($default);

        if ($defaultTitle && !$field->getLanguageValue($english))
            $field->setLanguageValue($english, $defaultTitle);



  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • Flashmaster82 changed the title to [SOLVED] How to copy title in multi language?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...