feel free to keep it strictly simple...

create and include language files

Custom language files

Simply copy a core language file of your choice, rename the file to ( for example) EN_custom.php and you are done. The custom file will automatically replace the standard core language file.

Keep in mind, that you have to be aware if core language files are modified via update of LEPTON. You can check the changelog or the update package for modifications.

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

Standard language files

If your addon needs language files please notice following conventions

(starting with LEPTON 2series):

  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. please include language files in your files where neccessary (e.g. tool.php in modules of type admintools) using
     *    Load Language file
    \\$langfile = (dirname(__FILE__))."/languages/". LANGUAGE .".php";
    require_once ( !file_exists(\\$langfile) ? (dirname(__FILE__))."/languages/EN.php" : \\$langfile );

  5. module language strings have to start with \\$MOD_, where could be also a abbreviation of the name of the module. 
  6. module language strings as keys of the associative array have to be in square brackets, can contain even spaces and should look something like
    \\$MOD_DROPLETS[ 'Please mark some Droplets to export' ]


Notice: since L* IV there are also "customized" language-files supported. The conversation is fairly simple by renaming the file/the copy of the languagefile in "xx_custom.php" , where "xx" is the Languagecode; eg "EN_custon.php" will be used instead of "EN.php".

If you use template files with TWIG template engine (lib_twig) within your addon you should notice following advices for template files (your_template.lte = Lepton Template Engine) :

  1. please copy this code in your files where neccessary (tool.php in admintools)
    global \\$loader;
    global \\$parser;
  2. put your code in your template files (.lte) between following code to ensure correct encoding
    {% autoescape false %}
    {% endautoescape %}
  3. refferring to the above conventions language strings have to be in markups, use square brackets, can contain even spaces and should look something like
    {{ MOD_DROPLETS['Please mark some Droplets to export'] }}

For more details please see Dropleps module and get further questions answered in  the addons-forum.