Documentation · ViewHelper reference

XSD schema file | vhs master

Resource / LanguageViewHelper

Resource: Language

Reads a certain language file with returning not just one single label, but all the translated labels.

Examples

<!-- Tag usage for force getting labels in a specific language (different to current is possible too) -->
<v:resource.language extensionName="myext" path="Path/To/Locallang.xlf" languageKey="en"/>

<!-- Tag usage for getting labels of current language -->
<v:resource.language extensionName="myext" path="Path/To/Locallang.xlf"/>

/

  • Tag usage example

    <v:resource.language as="NULL" extensionName="NULL" path="'locallang.xlf'" languageKey="NULL">
    	<!-- tag content - may be ignored! -->
    </v:resource.language>
  • Inline usage example

    {v:resource.language(as: 'NULL', extensionName: 'NULL', path: ''locallang.xlf'', languageKey: 'NULL')}

Arguments

Argument Description Type
as

Template variable name to assign; if not specified the ViewHelper returns the variable instead.

string
extensionName

Name of the extension

string
languageKey

Key for getting translation of a different than current initialized language

string
path

Absolute or relative path to the locallang file

string
Required attribute

Revision history

commit 3665ef02dd0cfb161a789cf8581474ef5ec14e7c
Author: Cornel Boppart <*****@snowflake.ch>
Date:   Sat Jan 3 13:55:17 2015 +0100

    [FEATURE] Added new viewhelper which gets all translations from a certain language file

commit d982a559c439c7554d3e5efa3e2c77c14612930f
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Sat Jan 17 16:49:53 2015 +0100

    [TASK] CGL - Remove backslashes in use

commit 8bb2fc5ee124ba19b0a0ab8e061c9a153fc4651f
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Sun Jan 18 17:56:13 2015 +0100

    [TASK] Reference Copyright to license.md file