A TYPO3 plugin to display a list of languages to select from. Clicking on a language links to the corresponding version of the page.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

34 lines
1.7 KiB

{namespace core=TYPO3\CMS\Core\ViewHelpers}
<f:form action="redirect" id="sr_language_menu_form" class="tx-srlanguagemenu">
<fieldset>
<legend>{f:translate(key:'form_fieldset_legend')}</legend>
<label for="sr_language_menu_select">{f:translate(key:'form_select_label')}</label>
<core:icon identifier="tx-srlanguagemenu-language" size="small" state="default" />
<select id="sr_language_menu_select" name="tx_srlanguagemenu_languagemenu[uri]" title="{f:translate(key: 'select_language', extensionName: 'SrLanguageMenu')}" {f:if(condition: '{settings.list.onChangeAttribute}', then: 'onchange="if (this.options[this.selectedIndex].value == \'\') return; location.href = this.options[this.selectedIndex].value;"')}>
<f:if condition="{settings.list.header}">
<option value ="">{f:translate(key:'select_language')}</option>
<f:if condition="{settings.list.separator}">
<option value ="">{settings.list.separator}</option>
</f:if>
</f:if>
<f:for each="{options}" as="option">
<f:if condition="{option.isAvailable}">
<f:if condition="{option.uid} == 0">
<f:then>
<f:if condition="{settings.hideIfDefaultLanguage} == 0">
<f:render partial="Option" arguments="{option: option, settings: settings}" />
</f:if>
</f:then>
<f:else>
<f:render partial="Option" arguments="{option: option, settings: settings}" />
</f:else>
</f:if>
</f:if>
</f:for>
</select>
<input name="tx_srlanguagemenu_languagemenu[action]" value="redirect" type="hidden" />
<f:if condition="{settings.list.onChangeAttribute} == 0">
<f:form.submit value="{f:translate(key:'form_submit')}" />
</f:if>
</fieldset>
</f:form>