Beta version

class TranslationViewer implements ViewableInterface

TranslationViewer

Methods

__construct(Translation $translation)

No description

array
getTranslationMenuAssignation(Request $request, boolean $absolute = false)

Return available page translation information.

Translator.
getTranslator()

No description

Twig_Environment
getTwig()

No description

Details

at line 46
__construct(Translation $translation)

Parameters

Translation $translation

at line 88
array getTranslationMenuAssignation(Request $request, boolean $absolute = false)

Return available page translation information.

Be careful, for static routes Roadiz will generate a localized route identifier suffixed with "Locale" text. In case of "force_locale" setting to true, Roadiz will always use suffixed route.

example return value

array (size=3)
  'en' =>
    array (size=4)
        'name' => string 'newsPage'
        'url' => string 'http://localhost/news/test'
        'locale' => string 'en'
        'active' => boolean false
        'translation' => string 'English'
  'fr' =>
    array (size=4)
        'name' => string 'newsPageLocale'
        'url' => string 'http://localhost/fr/news/test'
        'locale' => string 'fr'
        'active' => boolean true
        'translation' => string 'French'
  'es' =>
    array (size=4)
        'name' => string 'newsPageLocale'
        'url' => string 'http://localhost/es/news/test'
        'locale' => string 'es'
        'active' => boolean false
        'translation' => string 'Spanish'

Parameters

Request $request
boolean $absolute Generate absolute url or relative paths

Return Value

array

at line 191
Translator. getTranslator()

Return Value

Translator.

at line 199
Twig_Environment getTwig()

Return Value

Twig_Environment