detect language to add custom menu (menu.tpl)

ThemeBurn SupportForumsOpenCart ThemesShoppica 2 OpenCart Themedetect language to add custom menu (menu.tpl)

This topic has been marked as not resolved.

I have two languages in my OC english & arabic. and I have to add some links to top menu but I have to detect which language is using so I can write the top menu in arabic or english.
here its my code


<?php if ($language_code == 'ar'): ?>
    
    <li id="custom_menu_id">
    <a href="http://antakiherbs.com/index.php?route=module/blog">blu blu</a>
  <li>
    
 <?php else: ?>
    
    <li id="custom_menu_id">
    <a href="http://antakiherbs.com/index.php?route=module/blog">Blog</a>
  <li>
    <?php endif; ?>

and I got this error.

Notice: Undefined variable: language_code in /home3/antakihe/public_html/catalog/view/theme/shoppica2/template/tb/menu.tpl on line 57

 ziny
January 5, 2014 at 5:09 pm #29796

Hi,

Here is a tutorial that will help you to add language variables in your theme:

http://support.themeburn.com/topic/add-custom-translation-ready-text

BR,
ThemeBurn team

January 8, 2014 at 2:26 pm #29839
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.