Hi,
I'll give you my solution to do that. First, go to the templates of your style and search for "
footer". Now, search this line of code:
Code:
<dl class="choosers">
<xen:if is="{$canChangeStyle}">
<dt>{xen:phrase style}</dt>
<dd><a href="{xen:link 'misc/style', '', 'redirect={$requestPaths.requestUri}'}" class="OverlayTrigger Tooltip" title="{xen:phrase style_chooser}" rel="nofollow">{$visitorStyle.title}</a></dd>
</xen:if>
<xen:if is="{$canChangeLanguage}">
<dt>{xen:phrase language}</dt>
<dd><a href="{xen:link 'misc/language', '', 'redirect={$requestPaths.requestUri}'}" class="OverlayTrigger Tooltip" title="{xen:phrase language_chooser}" rel="nofollow">{$visitorLanguage.title}</a></dd>
</xen:if>
</dl>
and replace it with:
Code:
<dl id="styleChooser" class="choosers">
<xen:if is="{$canChangeStyle}">
<dt>{xen:phrase style}</dt>
<dd><a href="{xen:link 'misc/style', '', 'redirect={$requestPaths.requestUri}'}" class="OverlayTrigger Tooltip" title="{xen:phrase style_chooser}" rel="nofollow">{$visitorStyle.title}</a></dd>
</xen:if>
</dl>
<dl id="languageChooser" class="choosers">
<xen:if is="{$canChangeLanguage}">
<dd><a href="{xen:link 'misc/language', '', 'language_id=1', '_xfToken={$visitor.csrf_token_page}', 'redirect={$redirect}'}">English</a></dd>
<dd><a href="{xen:link 'misc/language', '', 'language_id=2', '_xfToken={$visitor.csrf_token_page}', 'redirect={$redirect}'}">French</a></dd>
</xen:if>
</dl>
These lines represent, for example, the English and French languages:
Code:
<dd><a href="{xen:link 'misc/language', '', 'language_id=1', '_xfToken={$visitor.csrf_token_page}', 'redirect={$redirect}'}">English</a></dd>
<dd><a href="{xen:link 'misc/language', '', 'language_id=2', '_xfToken={$visitor.csrf_token_page}', 'redirect={$redirect}'}">French</a></dd>
If you want to add another language, simply add this line below the last language:
Code:
<dd><a href="{xen:link 'misc/language', '', 'language_id=2', '_xfToken={$visitor.csrf_token_page}', 'redirect={$redirect}'}">Language Name</a></dd>
This:
represents the id of the language that you can find here:
View attachment 101789
Then, go to "
EXTRA.css" and add this:
Code:
#languageChooser
{
text-indent: -9999px
}
#languageChooser dd a:before
{
content: "";
float: left;
width: 16px;
height: 16px;
margin: 1px 5px 0 0;
}
#languageChooser dd:nth-child(1) a:before
{
background: url('@imagePath/us.png') no-repeat;
}
#languageChooser dd:nth-child(2) a:before
{
background: url('@imagePath/fr.png') no-repeat;
}
:nth-child(1) represents the first language and if you want add a second language, add
:nth-child(2),
:nth-child(3) for the third language, etc.
I recommend these icons:
http://www.famfamfam.com/lab/icons/flags/
Result:
View attachment 101790