Results 1 to 6 of 6
  1. #1

    Default Where are page specific language file included?

    Can someone point me at the piece of code that includes page specific language files please?
    I'm trying to make a jQuery mobile version of my store. On the whole, it is pretty straight forward....most pages just work.

    One problem I've just noticed is it seems that the loading of page specific language files isn't working correctly.
    It seems to be including all language files that begin with the current page name.
    For example, if I load the checkout_shipping page, I seem to be getting the checkout_shipping AND the checkout_shipping_address language files loaded.

    I'm pretty sure this will be down to something I've done!
    If you can let me know where the language files are pulled in, I should be able to see what's going on.

    Thanks!

  2. #2

    Default Re: Where are page specific language file included?

    it's ok I've found it...includes/modules/require_languages.php

  3. #3

    Default Re: Where are page specific language file included?

    It seems this does include both files as I thought.
    If I leave the echo in this section of code
    Code:
    // set language or template language file
    $directory_array = $template->get_template_part($language_page_directory . $template_dir_select, '/^'.$current_page_base . '/');
    while(list ($key, $value) = each($directory_array)) {
      echo "I AM LOADING: " . $language_page_directory . $template_dir_select . $value . '<br />';
      require_once($language_page_directory . $template_dir_select . $value);
    }
    I get...
    I AM LOADING: includes/languages/english/template/checkout_shipping.php<br />
    I AM LOADING: includes/languages/english/template/checkout_shipping_address.php<br />

    ...is there a reason for loading both language files?
    In other words, is it normal Zen Cart behavior or something I've broken?

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Where are page specific language file included?

    It's normal.
    .

    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.

  5. #5

    Default Re: Where are page specific language file included?

    Thanks Doctor B,
    Do you know if it will cause any problems if I change it to load only the 1 specific page language file?

    Just out of curiosity, why does it load both language files?

  6. #6
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Where are page specific language file included?

    What problem is it causing for you right now?
    .

    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.

 

 

Similar Threads

  1. v155 New page, language file not being included ... I think
    By mesnitu in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 2 Jun 2016, 05:05 PM
  2. v151 Where are file uploads handled?
    By allthingsidLeroy in forum General Questions
    Replies: 2
    Last Post: 29 May 2013, 10:20 PM
  3. List constants from a specific language file?
    By torvista in forum General Questions
    Replies: 3
    Last Post: 8 Jul 2011, 08:15 PM
  4. Where are the language files for HTML emails ?
    By drgr33n in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 14 Oct 2010, 02:37 PM
  5. Where are the product-specific reviews called?
    By lat9 in forum General Questions
    Replies: 0
    Last Post: 30 Sep 2009, 09:55 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