Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    Join Date
    Apr 2006
    Location
    Sofia, Bulgaria
    Posts
    203
    Plugin Contributions
    0

    Default Re: Two languages - two templates. Can this be done?

    yes I tried to enter the code but i get a blank page i dont know to put it I mean

    PHP Code:
    <?php
    $language 
    $_SESSION['language'];

    I had EN in my code and

    $_SESSION['language']; return 'english'not 'en'
    ?>
    Your HTML table with menu in one language meny here

    <?php

    } else {
    ?>

    Your HTML with ENGLISH language meny and images here


    <?php
    }
    ?>
    Is this what I have to enter and then what html code I have to enter for the images ?
    give me some example ? to help orient somehow
    Negative feelings were burned by the progressive increase of Euphoria

  2. #12
    Join Date
    May 2005
    Posts
    51
    Plugin Contributions
    0

    Default Re: Two languages - two templates. Can this be done?

    Here is my code from tpl_header:

    Copyright message was here.....So this is after the copyright of the message:

    <?php
    //$_SESSION['language'] = $_GET['language'];
    //$language = $_GET['language'];
    //$language_page_directory = DIR_WS_LANGUAGES . $_SESSION['language'] . '/';


    $lang = $_SESSION['language'];

    if ( $lang == 'greek') {
    ?>
    <table width="765" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td width="420" height="34" bgcolor="#ffffff"><img src="images/spacer.gif" width="1" height="34"></td>
    <td width="124" height="34"><a href="http://www.yourdomain.com/index.php?main_page=login"><img src="images/r1_c1.gif" width="124" height="34" border="0"></a></td>
    <td width="96" height="34"><a href="http://www.yourdomain.com/index.php?main_page=conditions"><img src="images/r1_c2.gif" width="96" height="34" border="0"></a></td>
    <td width="63" height="34"><a href="http://www.yourdomain.com/index.php?main_page=site_map"><img src="images/r1_c3.gif" width="63" height="34" border="0"></a></td>
    <td width="62" height="34" bgcolor="#ffffff">&nbsp;</td>
    </tr>
    </table>
    <?php

    } else {
    ?>
    <table width="765" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td width="420" height="34" bgcolor="#ffffff"><img src="images/spacer.gif" width="1" height="34"></td>
    <td width="79" height="34"><a href="http://www.yourdomain.com/index.php?main_page=login"><img src="images/r1_c1_EN.gif" width="79" height="34" border="0"></a></td>
    <td width="90" height="34"><a href="http://www.yourdomain.com/index.php?main_page=conditions"><img src="images/r1_c2_EN.gif" width="90" height="34" border="0"></a></td>
    <td width="114" height="34"><a href="http://www.yourdomain.com/index.php?main_page=site_map"><img src="images/r1_c3_EN.gif" width="114" height="34" border="0"></a></td>
    <td width="62" height="34" bgcolor="#ffffff">&nbsp;</td>
    </tr>
    </table>



    <?php
    }
    ?>
    <?php
    if ( $lang == 'greek' ) {
    ?>
    <table width="765" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
    <tr>
    <td width="12" height="71" bgcolor="#ffffff"><img src="images/spacer.gif" width="1" height="71"></td>
    <td width="14" height="71"><img src="images/r2_c1.gif" width="14" height="71"></td>
    <td width="109" height="71"><img src="images/r2_c2.gif" width="109" height="71"></td>
    <td width="127" height="71"><img src="images/r2_c3.gif" width="127" height="71"></td>
    <td width="122" height="71"><img src="images/r2_c4.gif" width="122" height="71"></td>
    <td width="122" height="71"><img src="images/r2_c5.gif" width="122" height="71"></td>
    <td width="54" height="71"><img src="images/r2_c6.gif" width="54" height="71"></td>
    <td width="80" height="71"><img src="images/r2_c7.gif" width="80" height="71"></td>
    <td width="111" height="71"><img src="images/r2_c8.gif" width="111" height="71"></td>
    <td width="14" height="71" bgcolor="#ffffff">&nbsp;</td>
    </tr>
    <tr>
    <td bgcolor="#ffffff" height="10" colspan="10"></td>
    </tr>
    </table>

    <?php

    } else {
    ?>
    <table width="765" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
    <tr>
    <td width="12" height="71" bgcolor="#ffffff"><img src="images/spacer.gif" width="1" height="71"></td>
    <td width="14" height="71"><img src="images/r2_c1.gif" width="14" height="71"></td>
    <td width="109" height="71"><img src="images/r2_c2.gif" width="109" height="71"></td>
    <td width="127" height="71"><img src="images/r2_c3.gif" width="127" height="71"></td>
    <td width="122" height="71"><img src="images/r2_c4.gif" width="122" height="71"></td>
    <td width="122" height="71"><img src="images/r2_c5.gif" width="122" height="71"></td>
    <td width="54" height="71"><img src="images/r2_c6.gif" width="54" height="71"></td>
    <td width="80" height="71"><img src="images/r2_c7_EN.gif" width="80" height="71"></td>
    <td width="111" height="71"><img src="images/r2_c8_EN.gif" width="111" height="71"></td>
    <td width="14" height="71" bgcolor="#ffffff">&nbsp;</td>
    </tr>
    <tr>
    <td bgcolor="#ffffff" height="10" colspan="10"></td>
    </tr>
    </table>



    <?php
    }
    ?>

    <?php
    if ( $lang == 'greek' ) {
    ?>
    <table width="765" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td width="12" height="29" bgcolor="#ffffff"><img src="images/spacer.gif" width="1" height="12"></td>
    <td width="66" height="29"><a href="http://www.yourdomain.com/index.php"><img src="images/r4_c1.gif" width="66" height="29" border="0"></a></td>
    <td width="160" height="29"><a href="http://www.yourdomain.com/index.php?main_page=index&cPath=7"><img src="images/r4_c2.gif" width="160" height="29"></a></td>
    <td width="120" height="29"><a href="http://www.yourdomain.com/index.php?main_page=products_new"><img src="images/r4_c3.gif" width="120" height="29" border="0"></a></td>
    <td width="146" height="29"><a href="http://www.yourdomain.com/index.php?main_page=products_all"><img src="images/r4_c4.gif" width="146" height="29" border="0"></a></td>
    <td width="97" height="29"><a href="advices.php"><img src="images/r4_c5.gif" width="97" height="29" border="0"></a></td>
    <td width="102" height="29"><a href="http://www.yourdomain.com/index.php?main_page=contact_us"><img src="images/r4_c6.gif" width="102" height="29" border="0"></a></td>
    <td width="48" height="29"><a href="http://www.yourdomain.com/index.php?main_page=gv_faq"><img src="images/r4_c7.gif" width="48" height="29" border="0"></a></td>
    <td width="14" height="29" bgcolor="#ffffff"><img src="images/spacer.gif" width="1" height="29"></td>
    </tr>
    <tr>
    <td bgcolor="#ffffff" height="10" colspan="10"></td>
    </tr>
    </table>



    <?php

    } else {
    ?>
    <table width="765" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td width="12" height="29" bgcolor="#ffffff"><img src="images/spacer.gif" width="1" height="12"></td>
    <td width="109" height="29"><a href="http://www.yourdomain.com/index.php"><img src="images/r4_c1_EN.gif" width="109" height="29" border="0"></a></td>
    <td width="118" height="29"><a href="http://www.yourdomain.com/index.php?main_page=index&cPath=7"><img src="images/r4_c2_EN.gif" width="118" height="29"></a></td>
    <td width="118" height="29"><a href="http://www.yourdomain.com/index.php?main_page=products_new"><img src="images/r4_c3_EN.gif" width="118" height="29" border="0"></a></td>
    <td width="169" height="29"><a href="http://www.yourdomain.com/index.php?main_page=products_all"><img src="images/r4_c4_EN.gif" width="169" height="29" border="0"></a></td>
    <td width="70" height="29"><a href="advices.php"><img src="images/r4_c5_EN.gif" width="70" height="29" border="0"></a></td>
    <td width="69" height="29"><a href="http://www.yourdomain.com/index.php?main_page=contact_us"><img src="images/r4_c6_EN.gif" width="69" height="29" border="0"></a></td>
    <td width="87" height="29"><a href="http://www.yourdomain.com/index.php?main_page=gv_faq"><img src="images/r4_c7_EN.gif" width="87" height="29" border="0"></a></td>
    <td width="14" height="29" bgcolor="#ffffff"><img src="images/spacer.gif" width="1" height="29"></td>
    </tr>
    <tr>
    <td bgcolor="#ffffff" height="10" colspan="10"></td>
    </tr>
    </table>


    <?php
    }
    ?>
    ...Code Continue here with:

    <?php
    // Display all header alerts via messageStack:
    if ($messageStack->size('header') > 0) {
    echo $messageStack->output('header');
    }
    if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
    echo htmlspecialchars(urldecode($_GET['error_message']));
    }
    if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
    echo htmlspecialchars($_GET['info_message']);
    } else {

    }
    ?>
    <!--bof-header logo and navigation display-->

    I cut the rest of the code...


    Hope this help....

    Regards, Zoran

  3. #13
    Join Date
    Apr 2006
    Location
    Sofia, Bulgaria
    Posts
    203
    Plugin Contributions
    0

    Default Re: Two languages - two templates. Can this be done?

    yes but did u thought that with this code it will redirect u whatever u are in, to the index ?
    I mean if u looking some product U will wish to change the language and then will redirect u to the index ? but I will just want to see other lang version of the product ?
    Negative feelings were burned by the progressive increase of Euphoria

  4. #14
    Join Date
    May 2005
    Posts
    51
    Plugin Contributions
    0

    Default Re: Two languages - two templates. Can this be done?

    I send you the link in a PM, so you can see that everything work normally. Example if you are on page new products, and click on english button, you stay on same page (new products) just on english language. Same apply for all pages.

    Regards, Zoreli

  5. #15
    Join Date
    Apr 2006
    Location
    Sofia, Bulgaria
    Posts
    203
    Plugin Contributions
    0

    Default Re: Two languages - two templates. Can this be done?

    Amm now I rewied the all threat and i found a missunderstanding

    Actually I need a language selector in my tpl_header
    And dont have an idea from where to get the code
    I tried from sidebox/language.php but it wont work



    do u have any idea

    10x

    Radoslav
    Negative feelings were burned by the progressive increase of Euphoria

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v138a How can i have two languages using the sermepa payment module?
    By zand in forum Addon Payment Modules
    Replies: 1
    Last Post: 13 Jun 2012, 11:56 PM
  2. Two domains for two different languages
    By fosmaster in forum General Questions
    Replies: 2
    Last Post: 19 Oct 2010, 11:03 AM
  3. Two Different Header two languages
    By PaulaSinner in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 21 Mar 2009, 10:04 PM
  4. Almost done just one or two questions - how to make my page look like this?
    By tag in forum Templates, Stylesheets, Page Layout
    Replies: 26
    Last Post: 24 Jan 2007, 06:48 AM
  5. Zones on two languages ?
    By sicness in forum General Questions
    Replies: 0
    Last Post: 19 Jul 2006, 02:39 PM

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