Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2007
    Posts
    3
    Plugin Contributions
    0

    Default Three Languages with three different menu

    Hello

    I create my custom template but I got a problem with php and languages. I'd like to have a different menu in english, spanish and portuguese...when someone click on english flag he can see the header menu in english... when someone click on spanish flah, menu in spanish language and portuguese flah portuguese menu.

    I found something like that:
    <?php
    $language = $_SESSION['language'];

    if ( $language == 'english' ) {
    ?>

    Menu here

    <?php

    } else {
    ?>

    English menu here


    <?php
    }
    ?>

    I created the menu with css and it works great with 2 languages ( English and spanish ), but i need something to work fine with 3 languages ( English is default, spanish and then Portuguese ).

    I hope someone can help me here :)

    thanks
    sandra

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Three Languages with three different menu

    Download a language pack from the downloads/language area and see how this is constructed.

    By installing the lang pack or creating your own, You will enter the text for each language and then it will switch automatically
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Oct 2007
    Posts
    3
    Plugin Contributions
    0

    Default Re: Three Languages with three different menu

    Hello again

    The language switch automatically but my custon menu .... nothing =\
    I made it with images , it's like... "Home" is an image, with an orange background .... on hover it's blue. With CSS it works fine with two languages, but i can't fix it with three.


    It works with that:
    <?php
    $language = $_SESSION['language'];

    if ( $language == 'english' ) {
    ?>

    Menu here

    <?php

    } else {
    ?>

    English menu here


    <?php
    }
    ?>

    That i found here, but I don't know php... when i try to add one more "IF" my page don't open at all = (

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Three Languages with three different menu

    You are going to need to use css per page solutions and in this case css per language. See the read_me in your css folder
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Three Languages with three different menu

    Try this:
    Code:
    <?php
    switch ($_SESSION['language']) {
    
    case 'english':
    ?> 
    
    English Menu here 
    
    <?php
    break;
    
    case 'spanish':
    ?>
    
    Spanish menu here
    
    <?php
    break;
    
    case 'portuguese':
    ?>
    Portuguese menu here
    
    <?php
    break;
    }
    ?>
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Oct 2007
    Posts
    3
    Plugin Contributions
    0

    Default Re: Three Languages with three different menu

    Thank you ;* it works great ^^

 

 

Similar Threads

  1. How to setup three different Shipping Method?
    By net1008 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 28 Aug 2009, 03:19 PM
  2. Setting three different shipping methods with two carriers
    By Meers007 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 22 Aug 2009, 07:29 PM
  3. Nochex on three different website?
    By snarfy in forum Addon Payment Modules
    Replies: 4
    Last Post: 16 Apr 2009, 07:58 PM
  4. Can't show three languages
    By littlehawk in forum General Questions
    Replies: 2
    Last Post: 16 Apr 2009, 02:36 AM
  5. Is it possible to use one paypal account with three different ZenCart shops?
    By tj1 in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 19 Jun 2006, 05:09 AM

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