Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 12:26:40 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155533 Posts in 21713 Topics by 7738 Members
Latest Member: Pattieardathfe
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: (Solved) Flags for Language switching  (Read 790 times)
Yumi

Offline Offline

Posts: 5


« on: September 26, 2009, 10:07:15 AM »

I followed the help page on language switching. Using the generic template, I inserted
Code:
show_menu(1, 0, 1, true, "[a]<img src=" .WB_URL .
  "/media/flags/[menu_title].gif />[/a]", '', '', '', false, '', 0);
into the index.php file. And it worked straight out of the box.

However, the flags are shown above the header. How can I get them to display within the header area. Must be a little code for the .css file.

Michael
« Last Edit: October 02, 2009, 01:37:49 PM by Yumi » Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #1 on: September 26, 2009, 11:08:38 AM »

The positioning is a mixture of where whinin the sourcecode of the template the menucall is positioned and css. The source positioning defines the container where the menu is shown. The CSS defines how it is shown.

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

Yumi

Offline Offline

Posts: 5


« Reply #2 on: September 26, 2009, 12:11:26 PM »

Thanks for the advice. I tried it an succeeded to some extend.

When I put that code into the header section like this:
Code:
div id="header">
<h1><a href="<?php echo WB_URL ?>"><?php page_title('''[WEBSITE_TITLE]'); ?></a></h1>
<h2>This is our homepage</h2>
show_menu(1, 1, 1, true, "[a]<img src=" .WB_URL .
  "/media/flags/[menu_title].gif />[/a]", '', '', '', false, '', 0);
</div>
Then it displays at the right place, but not flags but like this:
"show_menu(1, 1, 1, true, "[a][/a]", '', '', '', false, '', 0); "

Michael

Logged
Yumi

Offline Offline

Posts: 5


« Reply #3 on: October 02, 2009, 01:37:11 PM »

I experimented with kweitzels advice  and some searching and here is my solution (bolt text is my addition):

Template generic, index.php

Code:
<div id="header">
<h1><a href="<?php echo WB_URL ?>"><?php page_title('''[WEBSITE_TITLE]'); ?></a></h1>
<h2>Zusammen meistern wir jede Situation</h2>
[b]<h3><a href="http://www.ot-exit.com/en"><img src="/media/flags/English.gif" alt="English" /img></a></h3>[/b]
</div>

Template generic, screen.css

Code:
[b]#header h3{
position: relative; bottom: 65px; left: 700px;
}[/b]

This displays a image called English.gif in folder /media/flags within the top-right header area. To keep languages separate I have two installations of websitebaker. German in / and one in /en . The line links to the English language site when the little flag image is clicked.
Looks really good and thanks for the help.

Michael
« Last Edit: October 02, 2009, 01:41:13 PM by Yumi » Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!