Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2010
    Posts
    15
    Plugin Contributions
    0

    Default custom tpl_header based on language

    Is it possible to apply the language overrides to the Common folder in a template

    currently my file is here /includes/templates/CUSTOM/common/tpl_header.php

    What I was hoping to have was something like

    /includes/templates/CUSTOM/common/English/tpl_header.php
    /includes/templates/CUSTOM/common/German/tpl_header.php
    /includes/templates/CUSTOM/common/French/tpl_header.php etc

    This way I can change elements like "item(s)" to reflect in each language, and I have a drop list that I want to display in each language as well in the header.

    Am I going about this the right way or should I maybe try something like

    /includes/templates/CUSTOM/English/common/tpl_header.php
    /includes/templates/CUSTOM/German/common/tpl_header.php
    /includes/templates/CUSTOM/French/common/tpl_header.php

    I don't see any language files in these templates and am at a loss as how to create them - i need to do this for about 8 different languages

    I have all the other bits of the shop working well with languages and currencies etc - just can't get my head around the header and footer

    Ruts.

  2. #2
    Join Date
    Dec 2007
    Posts
    10
    Plugin Contributions
    0

    Default Re: custom tpl_header based on language

    Add your own defines in
    /includes/languages/english/CUSTOM/header.php

    Something like:
    PHP Code:
    define('HEADER_TITLE_CART_ITEM''Item(s)'); 
    do the same for other languages

    Then use those in /includes/templates/CUSTOM/common/tpl_header.php page

  3. #3
    Join Date
    Feb 2010
    Posts
    15
    Plugin Contributions
    0

    Default Re: custom tpl_header based on language

    Thank you - that worked perfectly!

  4. #4
    Join Date
    Sep 2006
    Posts
    542
    Plugin Contributions
    0

    Default Re: custom tpl_header based on language

    Quote Originally Posted by Ruts67 View Post


    I don't see any language files in these templates and am at a loss as how to create them - i need to do this for about 8 different languages


    Rus.

    Any english folder can be copied and placed inside your other language folder then edited or translate the defines into the added language.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    Play with it long enough and you will break it.

 

 

Similar Threads

  1. load tpl_header based on device type
    By solo_400 in forum General Questions
    Replies: 7
    Last Post: 22 Mar 2016, 07:03 PM
  2. v139h tpl_header.php how to set different logos for each language?
    By ilmarchez in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 25 Mar 2013, 11:11 PM
  3. now in your cart in another language (tpl_header.php)
    By cinziapdl in forum Addon Language Packs
    Replies: 12
    Last Post: 10 Feb 2012, 12:31 AM
  4. tpl_footer & tpl_header text based on language
    By shocker in forum Addon Language Packs
    Replies: 24
    Last Post: 28 Dec 2008, 10:48 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