feel free to keep it strictly simple...

create and include language files

Standard language files

If your addon needs language files please notice following conventions

  1. language files are placed in a addon- subdirectory called "/languages",
  2. language files have to be named like languages, example given: "EN.php" or "NL.php" or "DE.php" ,
  3. the keys in the arrays in the language files should be sorted in alphabetical order,
  4. module language strings should be placed in an associative array that must be named like the addon: $MOD_[ADDON_NAME]. See an existing Addon as example.
  5. module language strings must be keys of this associative array .

If you run into problems please search for an example in the Addons-Repository or check the forum for details.

Custom language files (add)

Simply create a language file for the addon and call the file ( for example) EN_add.php . The "ADD" file will automatically add  the language strings to the current language file. If the language string is already existing in the origin language file it will be replaced with the content of the "ADD "file, so you don't have to care about changes or additions in the origin file.

Starting with L* 7.4.0 all language_add files are merged automatically and don't need the following merge code any longer!

Search for an example in the Addons-Repository or check the forum for examples or details.

Please take care, that the "ADD" file looks like follwowing example:

$MOD_ADDON-NAME_ADD = [ 'description' => "Additional description or overwriting existing string" ]; if (file_exists(LEPTON_PATH.'/modules/addon-name/languages/EN.php')) { require (LEPTON_PATH.'/modules/addon-name/languages/EN.php'); $MOD_ADDON-NAME = array_merge($MOD_ADDON-NAME,$MOD_ADDON-NAME_ADD); }

Example

last edit: 12. Mar 2024 CET 20:17:36

Custom language files(custom)

Starting with L* 7.4.0 custom language files are obsolete, please use Custom language add files instead.

The upgrade script to L* 7.4.0 rename all custom language files to add language files.See if you have to rework your add files.

Notice: the same procedure is working with core language files!