{namespace lang=TYPO3\CMS\Lang\ViewHelpers}

<f:form action="updateLanguageSelection" name="languageSelectionForm" object="{languageSelectionForm}">
	<f:form.hidden name="languageSelectionForm[selectedLanguages][]" />
	<table border="0" cellpadding="0" cellspacing="0" class="gridTable selectionList">
		<thead>
			<tr>
				<td class="check notSortable"></td>
				<td class="language"><f:translate key="table.language">Language</f:translate></td>
				<td class="locale"><f:translate key="table.locale">Locale</f:translate></td>
			</tr>
		</thead>
		<tbody>
			<f:for each="{languageSelectionForm.languages}" as="language" iteration="iteration">
				<tr class="{f:if(condition: language.selected, then: 'selected', else: '')}">
					<td class="check"><f:form.checkbox name="languageSelectionForm[selectedLanguages][{iteration.index}]" value="{language.locale}" checked="{f:if(condition: language.selected, then: 'checked', else: '')}" id="locale-{language.locale}" /></td>
					<td class="language"><label for="locale-{language.locale}">{language.language}</label></td>
					<td class="locale"><label for="locale-{language.locale}">{language.locale}</label></td>
				</tr>
			</f:for>
		</tbody>
	</table>
</f:form>