Zen Cart Logo
Forums / Addon Templates / tpl_top_nav.php & switching languges

tpl_top_nav.php & switching languges

Views: 694

Results 1 to 3 of 3
13 Nov 2011, 2:43 PM
#1
haizi72g3t avatar

haizi72g3t

New Zenner

Join Date:
Nov 2011
Posts:
39
Plugin Contributions:
0

tpl_top_nav.php & switching languges

https://www.bh-init.com

i made website into 2 language, English and Arabic.

iv changed the translation of the navigation and all of them work fine expect for 2

iv made new navigation Services & Events however when i change the header.php in language it wouldn't change events & services

// top navigation menu text

define('TOP_MENU_NEW_PRODUCTS', 'السلع');

define('TOP_MENU_SERVICES', 'المناسبات');

define('TOP_MENU_EVENTS', 'الخدمات');

define('TOP_MENU_SPECIALS', 'العروض');

define('TOP_MENU_VIEW_CART', 'سلة التسويق');

define('TOP_MENU_MY_ACCOUNT', 'حسابي');

13 Nov 2011, 5:03 PM
#2
haizi72g3t avatar

haizi72g3t

New Zenner

Join Date:
Nov 2011
Posts:
39
Plugin Contributions:
0

Re: tpl_top_nav.php & switching languges

nvm i solved it :)

7 Nov 2012, 7:36 PM
#3
shopville avatar

shopville

Zen Follower

Join Date:
Aug 2012
Posts:
331
Plugin Contributions:
0

Re: tpl_top_nav.php & switching languges

Hello,

i'm trying to have tabs (tpl_top_nav.php) for 2 languages, can you advise your solution?

This is how my tpl_top_nav.php looks like:

<?php
/**
 * Template designed by zen-cart-power.net* 
 * Power your Zen Cart!

 * @copyright Copyright 2008-2010 Newlement
*/  
?>

<div id="top_nav">

<div class="top-nav-left"></div>
<div class="top-nav-right"></div>


<ul class="list-style-none float-left">



<?php 
if ($this_is_home_page) { $active = 'id="tab_active"'; 
	} else { $active = '';
}?>
		<li <?php echo $active;?>><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>


<?php 
if ($current_page_base == 'products_new') {	$active	= 'tab_active'; 
	} else { $active = '';
}?>
		<li <?php echo $active;?>><a href="http://chequesplus.com/index.php?main_page=index&cPath=1"><?php echo 'Computer Cheques';?></a></li>

<?php
if ($current_page_base == 'products_new') {	$active	= 'tab_active'; 
	} else { $active = '';
}?>
		<li <?php echo $active;?>><a href="http://chequesplus.com/index.php?main_page=index&cPath=2"><?php echo 'Manual Cheques' ;?></a></li>

<?php
if ($current_page_base == 'specials') { $active = 'tab_active'; 
	} else { $active = '';
}?>
		<li <?php echo $active;?>><a href="http://chequesplus.com/index.php?main_page=index&cPath=7"><?php echo 'Blank Cheque Stock';?></a></li>
		
		<?php
if ($current_page_base == 'specials') { $active = 'tab_active'; 
	} else { $active = '';
}?>
		<li <?php echo $active;?>><a href="http://chequesplus.com/index.php?main_page=index&cPath=6"><?php echo 'Envelopes';?></a></li>

<?php 
//if ($current_page_base == 'featured_products') { $active = 'tab_active'; 
	//} else { $active = '';
//}?>
		<!--li <?php //echo $active;?>><a href="index.php?main_page=featured_products"><?php //echo TOP_MENU_FEATURED_PRODUCTS;?></a></li-->

<?php  
if ($current_page_base == 'account' || $current_page_base == 'login' || $current_page_base == 'account_edit' || $current_page_base == 'address_book' || $current_page_base == 'account_password' || $current_page_base == 'account_newsletters' || $current_page_base == 'account_notifications') { $active = 'tab_active'; 
	} else { $active = '';
}?>
		<!--li <?php //echo $active;?>><a href="<?php // echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php// echo TOP_MENU_MY_ACCOUNT;?></a></li-->
									<?php if (DEFINE_CONTACT_US_STATUS <= 1) { ?>    <li><?php echo '<a href="' . zen_href_link(FILENAME_CONTACT_US, '', 'SSL') . '">' . BOX_INFORMATION_CONTACT . '</a>'; ?></li>  <?php } ?>				
<?php   
//if ($current_page_base == 'shopping_cart') { $active = 'tab_active'; 
	//} else { $active = '';
//}?>
		<!--li <?php //echo $active;?>><a href="<?php //echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php //echo TOP_MENU_VIEW_CART;?></a></li-->							  
	</ul>

<div class="languages-wrapper float-right">
<?php   
    $languges_object = new language;   
//    if (count ($languges_object->catalog_languages) > 1){
?>
            <div class="languages float-right">
				<?php require($template->get_template_dir('tpl_header_languages.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_header_languages.php'); 
				echo $content;?>     
            </div>
<?php
//    } 
?>      
         
<?php   
   if (isset($currencies) && is_object($currencies) && count ($currencies->currencies) > 1){
?>
				<div class="currency float-right">
				<?php require($template->get_template_dir('tpl_header_currencies.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_header_currencies.php'); 
				echo $content;?>  
                </div>
<?php
  } 
?>                  
		</div>
		<div class="clearBoth"></div>

</div>