Page 1 of 1

Can you share the same language file in both the shop and admin?

Posted: Thu Feb 12, 2026 4:53 pm
by ArtcoInc
I have some duplicate language definitions in both:

/includes/languages/english.php
and
/admin/includes/languages/english.php

If I want to edit these, there is a non-zero chance that I will edit one and not the other. Is there a way that these language definitions could be shared in a single file across both the shop and admin?

(Yes, they could be added in the configurations table in the database, but doesn't that become more difficult if the store in multi-lingual?)

TIA

Re: Can you share the same language file in both the shop and admin?

Posted: Thu Feb 26, 2026 9:40 pm
by Omar_one
ArtcoInc wrote: Thu Feb 12, 2026 4:53 pm I have some duplicate language definitions in both:

/includes/languages/english.php
and
/admin/includes/languages/english.php

If I want to edit these, there is a non-zero chance that I will edit one and not the other. Is there a way that these language definitions could be shared in a single file across both the shop and admin?

(Yes, they could be added in the configurations table in the database, but doesn't that become more difficult if the store in multi-lingual?)

TIA
try this
- Create a shared file: Create /includes/languages/english/global_definitions.php
- Move your shared defines there
-Link them: In both /includes/languages/english.php and /admin/includes/languages/english.php, add this near the top

Code: Select all

require_once(DIR_FS_CATALOG . 'includes/languages/english/global_definitions.php');

Re: Can you share the same language file in both the shop and admin?

Posted: Sun Mar 01, 2026 10:53 am
by burt
I wouldn't advise to do so, as you're breaking foundations, which may cause the whole shop to collapse...

The better way would be to simply put a BIG NOTICE at the top (or somewhere) in each file;

// ADMIN SIDE ENGLISH

// SHOP SIDE ENGLISH

to remind you which version you are working on...