Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2024
    Location
    USA
    Posts
    2
    Plugin Contributions
    0

    help question Language file overrides - replace or overwrite?

    I know that with regular template overrides, the logic is "if override file exists, use that instead of base file."

    For language overrides, is the logic the same? Or does it load the base file, and then the override file (overwriting specific $define[]s)?
    Basically, do I have to include the whole base file as my language override or can I only include what I want changed?

    I found an old thread that stated that only english.php has overwrite functionality, but that seems to be from before the 1.5.8 change. Was this changed?

  2. #2
    Join Date
    Feb 2024
    Location
    USA
    Posts
    2
    Plugin Contributions
    0

    Default Re: Language file overrides - replace or overwrite?

    OK, embarrassingly - the docs mention this.
    Using arrays allows for the following kinds of behavior:
    - Create a set of language definitions in the storefront override files, but run the base file to ensure that any missing definitions are created, while not updating any definitions that are changed in the override.
    It doesn't explicitly say that it does this, but paired with the comments in ArraysLanguageLoader, I'm acting on the assumption it does.
    If I'm wrong I'll just go back a commit ¯\_(ツ)_/¯

 

 

Similar Threads

  1. Replies: 2
    Last Post: 11 Feb 2013, 09:02 PM
  2. Language Overrides and Templates
    By retched in forum Contribution-Writing Guidelines
    Replies: 3
    Last Post: 26 Mar 2011, 05:44 AM
  3. 2nd Language & Overrides
    By kobra in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 9 Jun 2006, 09:50 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR