Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2005
    Posts
    336
    Plugin Contributions
    0

    Default Non-selected language header link

    I created a group of icons in the header to replace the text links in the header navigation, like 'login', 'contact us', etc. I want one of these icons to be for switching to the other language. I have it almost working (maybe?) -- it switches correctly from language 1 -> 2, but not the other way around. Here's what I have:

    Code:
    <?php echo '<div class="' . strtolower(HEADER_TITLE_LANGUAGE) . '"><a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '"></a></div>';?>
    I know, I canibalized this code incorrectly but not sure what i'm missing. Any advice to get it fully functioning? I saw the threads on creating a language_header.php to put all of the language flags in the header. I only have two languages and want it to display JUST the one that is currently not selected.

    Thanks in advance! Running 1.3.0.1 if it matters...

  2. #2
    Join Date
    Aug 2005
    Posts
    336
    Plugin Contributions
    0

    Default Re: Non-selected language header link

    Ok, I figured it out myself (maybe).

    Code:
    if ($_SESSION['languages_id'] == 1) {$key = 'da';}
    	      else {$key = 'en';}
    	      echo '<div class="' . strtolower(HEADER_TITLE_LANGUAGE) . '"><a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '"></a></div>';?>
    It seemingly works now but I just guessed without knowing how this actually works. Can someone verify I'm not messing anything up with this?

 

 

Similar Threads

  1. Header link: open in new window as non SSL from a secure page
    By dharma in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 12 Feb 2008, 04:16 PM
  2. HtmlArea not working if danish language is selected
    By Bendtsen in forum General Questions
    Replies: 0
    Last Post: 13 Dec 2006, 11:26 AM
  3. Language selected header logo ?
    By johnny43 in forum General Questions
    Replies: 6
    Last Post: 10 Jul 2006, 02:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR