Language File Loading Conventions

Which language files are loaded for my plugin?

If a storefront side plugin creates a new page

index.php?main_page=newpage

It will be able to use language definitions from the following files, which will be automatically loaded:

  • the main language file includes/languages/lang.english.php and the templated version of that file, includes/languages/YOURTEMPLATE/lang.english.php.

  • files in includes/languages/english/extra_definitions (and their templated versions)

  • The page’s own language file, includes/languages/english/lang.newpage.php

  • Language files which are a substring match of the name of the main file - for example, includes/languages/english/lang.newpage_process.php and includes/languages/english/lang.newpage_success.php. Note that this behavior may be disabled for specific files - see substring matching for language files.

If you need to load a language file that’s not loaded by these conventions, follow the instructions in loading a language file.




Still have questions? Use the Search box in the upper right, or try the full list of FAQs. If you can't find it there, head over to the Zen Cart support forum and ask there in the appropriate subforum. In your post, please include your Zen Cart and PHP versions, and a link to your site.

Is there an error or omission on this page? Please post to General Questions on the support forum. Or, if you'd like to open a pull request, just review the guidelines and get started. You can even PR right here.
Last modified August 23, 2024 by Scott C Wilson (2c7c41e8).