<xf:title>{{ phrase('language_chooser') }}</xf:title>

<div class="block">
	<div class="block-container">
		<div class="block-body">
			<a href="{{ link('account/language', null, {'language_id': 0, '_xfRedirect': $redirect, 't': csrf_token()}) }}"
				class="menu-linkRow menu-linkRow--alt {{ $xf.visitor.Admin.admin_language_id == 0 ? 'is-selected' : '' }}">

				{{ phrase('use_forum_language_preference') }}
			</a>

			<hr class="block-separator" />

			<ul class="listPlain listColumns">
				<xf:foreach loop="$languageTree.getFlattened(0)" value="$treeEntry">
					<li>
						<a href="{{ link('account/language', null, {'language_id': $treeEntry.record.language_id, '_xfRedirect': $redirect, 't': csrf_token()}) }}"
							class="menu-linkRow {{ $xf.visitor.Admin.admin_language_id == $treeEntry.record.language_id ? 'is-selected' : '' }}"
							dir="auto">

							{$treeEntry.record.title}
						</a>
					</li>
				</xf:foreach>
			</ul>
		</div>
	</div>
</div>