public function render()
    {
        $this->applyElementBehavior();

        $elements = [];

        if ($this->cloneElement()) {
            $originalArguments = $this->arguments();
            $originalMethods = $this->methods();

            $locales = $this->locales();
            // Check if a custom locale set is requested.
            if ($count = func_num_args()) {
                $args = ($count == 1 ? head(func_get_args()) : func_get_args());
                $locales = array_intersect($locales, (array) $args);
            }

            foreach ($locales as $locale) {
                $this->arguments($originalArguments);
                $this->methods($originalMethods);
                
                $name = str_contains($originalArguments['name'], '%locale') ? $originalArguments['name'] : '%locale[' . $originalArguments['name'] . ']';
                $this->overwriteArgument('name', str_replace('%locale', $locale, $name));
                
                if ($this->translatableIndicator()) {
                    $this->setTranslatableLabelIndicator($locale);
                }
                if (!empty($this->config['form-group-class'])) {
                    $this->addMethod('addGroupClass', str_replace('%locale', $locale, $this->config['form-group-class']));
                }
                if (!empty($this->config['input-locale-attribute'])) {
                    $this->addMethod('attribute', [$this->config['input-locale-attribute'], $locale]);
                }
                $elements[] = $this->createInput($locale);
            }
        } else {
            $elements[] = $this->createInput();
        }

        $this->reset();

        return implode('', $elements);
    }
public function render()
    {
        $this->applyElementBehavior();

        $elements = [];

        if ($this->cloneElement()) {
            $originalArguments = $this->arguments();
            $originalMethods = $this->methods();

            $locales = $this->locales();
            // Check if a custom locale set is requested.
            if ($count = func_num_args()) {
                $args = ($count == 1 ? head(func_get_args()) : func_get_args());
                $locales = array_intersect($locales, (array) $args);
            }

            foreach ($locales as $locale) {
                $this->arguments($originalArguments);
                $this->methods($originalMethods);
                
                $name = str_contains($originalArguments['name'], '%locale') ? $originalArguments['name'] : '%locale[' . $originalArguments['name'] . ']';
                $this->overwriteArgument('name', str_replace('%locale', $locale, $name));
                
                if ($this->translatableIndicator()) {
                    $this->setTranslatableLabelIndicator($locale);
                }
                if (!empty($this->config['form-group-class'])) {
                    $this->addMethod('addGroupClass', str_replace('%locale', $locale, $this->config['form-group-class']));
                }
                if (!empty($this->config['input-locale-attribute'])) {
                    $this->addMethod('attribute', [$this->config['input-locale-attribute'], $locale]);
                }
                $elements[] = $this->createInput($locale);
            }
        } else {
            $elements[] = $this->createInput();
        }

        $this->reset();

        return implode('', $elements);
    }
public function render ( ) { $ this -> applyElementBehavior ( ) ; $ elements = [ ] ; if ( $ this -> cloneElement ( ) ) { $ originalArguments = $ this -> arguments ( ) ; $ originalMethods = $ this -> methods ( ) ; $ locales = $ this -> locales ( ) ; // Check if a custom locale set is requested. if ( $ count = func_num_args ( ) ) { $ args = ( $ count == 1 ? head ( func_get_args ( ) ) : func_get_args ( ) ) ; $ locales = array_intersect ( $ locales , ( array ) $ args ) ; } foreach ( $ locales as $ locale ) { $ this -> arguments ( $ originalArguments ) ; $ this -> methods ( $ originalMethods ) ; $ name = str_contains ( $ originalArguments [ 'name' ] , '%locale' ) ? $ originalArguments [ 'name' ] : '%locale[' . $ originalArguments [ 'name' ] . ']' ; $ this -> overwriteArgument ( 'name' , str_replace ( '%locale' , $ locale , $ name ) ) ; if ( $ this -> translatableIndicator ( ) ) { $ this -> setTranslatableLabelIndicator ( $ locale ) ; } if ( ! empty ( $ this -> config [ 'form-group-class' ] ) ) { $ this -> addMethod ( 'addGroupClass' , str_replace ( '%locale' , $ locale , $ this -> config [ 'form-group-class' ] ) ) ; } if ( ! empty ( $ this -> config [ 'input-locale-attribute' ] ) ) { $ this -> addMethod ( 'attribute' , [ $ this -> config [ 'input-locale-attribute' ] , $ locale ] ) ; } $ elements [ ] = $ this -> createInput ( $ locale ) ; } } else { $ elements [ ] = $ this -> createInput ( ) ; } $ this -> reset ( ) ; return implode ( '' , $ elements ) ; }
Renders the current translatable form element.

@return string
Renders the current translatable form element .