Hi,

I'm using I18 on my site with the Mix_and_Match theme.

I want to show the language selector in an "horizontal" list og choice in the "heder" block zone. How can i configure the skinr block options for "language switcher" ?

Regards.

CommentFileSizeAuthor
#7 horizontal_flag_menu.zip2 KBderieppe
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

newnewuser’s picture

waiting for answer too!!

ajross’s picture

You will probably have to write the CSS to style this block yourself, if the Skinr options do not give you the layout and styling you need. I haven't really used I18 enough to know specifically what you are referring to, though. If you provide a screenshot or a link, I might be able to give you some tips.

derieppe’s picture

Status: Needs review » Active

Hi,
It's solve. I've done like that :

1° Add theses lines at the begining of bloc.tpl.php :

<?php
if ($block->module == 'locale' && $block->delta == '0' ) {
    include 'locale.block.tpl.php'; /*load a custom template for this block ID */
    return; }
?>

2° Copy bloc.tpl.php to locale.block.tpl.php
3° Modify the "print $block" line in locale.block.tpl.php

<div class="content clearfix">
		<div id="flag_menu">
			<?php print $block->content ?>
		</div>	
      </div>

4° Add this (for example) in the CCS file.

#flag_menu {
  margin: 0;
  padding: 0;
  list-style-type: none;
  font-size: 1em;
}
#flag_menu li {
  width: 110px;
  text-align: left;
  display: inline;
}
#flag_menu a,
#flag_menu a:link,
#flag_menu a:active,
#flag_menu a:visited {
  text-decoration: none;
  padding: 0.5em 0.3em 0.4em 0.3em;
  font-size: 100%; 
  color: white;
}
#flag_menu a.active,
#flag_menu a.active:link,
#flag_menu a.active:active,
#flag_menu a.active:visited {
  text-decoration: none;
  font-weight:bold;
  color: #FF8C00;
}

Note : the "display: inline;" option made the li to be display horizontal.

5° Upload files on the theme directory.
6° Go to i18 parameters and keep (or not) the text in the link before or after the flag.

Hope this will help ...

derieppe’s picture

Status: Active » Needs review
ajross’s picture

Status: Active » Closed (fixed)
atpaust’s picture

I am not a programer but would like to locate my Language Switcher (block) into a horizontal bar by repeating the step 1 to step 6. But I was unable to find where the two files, bloc.tpl.php and locale.block.tpl.php, were.

I did not find the two files in the sites/all/themes/mix_and_match directory, nor by using the command line, locate myfilename. I also would like to know the location of the CSS file. Can anyone tell me where those files are?

Thank you in advance

Daniel

derieppe’s picture

Hi,

The bloc.tpl.php is deliver with the mix_and_macth theme.

Should be in your : sites/all/themes/mix_and_match directory.

1° Copy this file to locale.block.tpl.php before editing.
2° Edit block.tpl.php
3° Edit locale.block.tpl.php
4° Edit CCS file.

CCS code as to be added in the local.css in the sites/all/themes/mix_and_match/css
(read the mix and macth readme note)

Samples in the zip file.

best regards

atpaust’s picture

Thank Philippe, the files does work as it claimed. I apprieciated your help.

Regrads

Daniel

ossama.selim’s picture

sorry but i can't find locale.block.tpl.php , in the locale module there is no files with this name?!
i need to make on my web site the same thing, but with "Dreamy theme" can you help me.

plz help!!

derieppe’s picture

Hi,

have a look at #3.
Solution is in the 2° action : Copy bloc.tpl.php to locale.block.tpl.php

Best regards

cesar.brod@gmail.com’s picture

Guys, take a look at this one here: http://drupal.org/node/1696588 - It worked as a charm for me!

ossama.selim’s picture

You can also put this piece of cod in your locale.css in modules/locale:
#block-locale-language ul li
{
display: inline;
}

lucasvm’s picture

i was abble to do it like this:

.language-switcher-locale-url li {
	display: inline;
	float:right;
}    

.language-switcher-locale-url li a{
	margin-right: 10px;
}

#block-locale-language .block-title {
    display:none;
}

on style.css of my theme

kanast’s picture

Issue summary: View changes

This is not working in Drupal 8.
I think the 'language-switcher' in D8 is 'languageswitcher' correct me if I am wrong.
It seems much more complicated in D8.
Does anyone know how to do this in D8?