If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Language file overrides - replace or overwrite?

Language file overrides - replace or overwrite?

Started by hucario on 19 Apr 2025, 3:58 AM · Views: 1,106

Results 1 to 2 of 2
19 Apr 2025, 3:58 AM
#1
hucario avatar

hucario

New Zenner

Join Date:
Feb 2024
Location:
USA
Posts:
2
Plugin Contributions:
0

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?

19 Apr 2025, 4:28 AM
#2
hucario avatar

hucario

New Zenner

Join Date:
Feb 2024
Location:
USA
Posts:
2
Plugin Contributions:
0

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 ¯_(ツ)_/¯