Jump to content

Language field on mobile header


kmk

Recommended Posts

I try and try searching for this feature, because my portal members are 2 groups languages people, and mayority use phone to navigate.

Right now the language field is set up end of page, any solution can put the language field option in the header? and thank for any tip.

languagemobile.PNG

Link to comment
Share on other sites

I try again, put it in mobileNavegation, but I do not how can make it center and give it a color visible.

{{$languages = \IPS\Lang::getEnabledLanguages();}}
	{{if count( $languages ) > 1}}
		<li>
			<a href='#elNavLang_menu' id='elNavLang' data-ipsMenu data-ipsMenu-above>{lang='language'} <i class='fa fa-caret-down'></i></a>
			<ul id='elNavLang_menu' class='ipsMenu ipsMenu_selectable ipsHide'>
			{{foreach $languages as $id => $lang }}
				<li class='ipsMenu_item{{if \IPS\Member::loggedIn()->language()->id == $id || ( $lang->default && \IPS\Member::loggedIn()->language === 0 )}} ipsMenu_itemChecked{{endif}}'>
					<form action="{url="app=core&module=system&controller=language" noprotocol="true" csrf="true" seoTemplate="language"}" method="post">
					<button type='submit' name='id' value='{$id}' class='ipsButton ipsButton_link'>{{if $lang->get__icon()}}<i class='{$lang->get__icon()}'></i> {{endif}}{$lang->title} {{if $lang->default}}{lang="default"}{{endif}}</button>
					</form>
				</li>
			{{endforeach}}
			</ul>
		</li>
	{{endif}}

 

languagecodenavbar5.PNG

languagecodenavbar6.PNG

Link to comment
Share on other sites

15 hours ago, kmk said:

Is possible replace the Language word by an icon to represent language option?

find

{lang='language'}

change to

<i class='fa fa-language'></i>

 

2 hours ago, kmk said:

I try again, put it in mobileNavegation, but I do not how can make it center and give it a color visible.

Add css classes to 

			<a href='#elNavLang_menu' id='elNavLang' data-ipsMenu data-ipsMenu-above>

Example "Sign Out" has 

ipsButton ipsButton_light ipsButton_small ipsButton_fullWidth

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...