src/Cms/LocaleAwareTrait.php
protected function formatAlternateTranslation($context, array $localeStruct)
    {
        return [
            'id'       => ($context['id']) ? : $this->templateName(),
            'title'    => ((string)$context['title']) ? : $this->title(),
            'url'      => $this->formatAlternateTranslationUrl($context, $localeStruct),
            'hreflang' => $localeStruct['code'],
            'locale'   => $localeStruct['locale'],
            'name'     => $localeStruct['name'],
            'native'   => $localeStruct['native'],
        ];
    }
protected function formatAlternateTranslation($context, array $localeStruct)
    {
        return [
            'id'       => ($context['id']) ? : $this->templateName(),
            'title'    => ((string)$context['title']) ? : $this->title(),
            'url'      => $this->formatAlternateTranslationUrl($context, $localeStruct),
            'hreflang' => $localeStruct['code'],
            'locale'   => $localeStruct['locale'],
            'name'     => $localeStruct['name'],
            'native'   => $localeStruct['native'],
        ];
    }
protected function formatAlternateTranslation ( $ context , array $ localeStruct ) { return [ 'id' => ( $ context [ 'id' ] ) ? : $ this -> templateName ( ) , 'title' => ( ( string ) $ context [ 'title' ] ) ? : $ this -> title ( ) , 'url' => $ this -> formatAlternateTranslationUrl ( $ context , $ localeStruct ) , 'hreflang' => $ localeStruct [ 'code' ] , 'locale' => $ localeStruct [ 'locale' ] , 'name' => $ localeStruct [ 'name' ] , 'native' => $ localeStruct [ 'native' ] , ] ; }
Format an alternate translation for the given translatable model.

Note: The application's locale is already modified and will be reset
after processing all available languages.

@param  mixed $context      The translated {@see \Charcoal\Model\ModelInterface model}
or array-accessible structure.
@param  array $localeStruct The currently iterated language.
@return array Returns a link structure.
Format an alternate translation for the given translatable model .