src/Screen/Field.php
private function translate(): self
    {
        if (empty($this->translations)) {
            return $this;
        }

        $lang = $this->get('lang');

        foreach ($this->attributes as $key => $attribute) {
            if (in_array($key, $this->translations, true)) {
                $this->set($key, __($attribute, [], $lang));
            }
        }

        return $this;
    }
private function translate(): self
    {
        if (empty($this->translations)) {
            return $this;
        }

        $lang = $this->get('lang');

        foreach ($this->attributes as $key => $attribute) {
            if (in_array($key, $this->translations, true)) {
                $this->set($key, __($attribute, [], $lang));
            }
        }

        return $this;
    }
private function translate ( ) : self { if ( empty ( $ this -> translations ) ) { return $ this ; } $ lang = $ this -> get ( 'lang' ) ; foreach ( $ this -> attributes as $ key => $ attribute ) { if ( in_array ( $ key , $ this -> translations , true ) ) { $ this -> set ( $ key , __ ( $ attribute , [ ] , $ lang ) ) ; } } return $ this ; }
Localization of fields.

@return $this
Localization of fields .