1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 06:38:00 +02:00

Updated e107 Coding Standard (markdown)

CaMer0n
2013-02-23 03:26:11 -08:00
parent 0d61b86322
commit 61719c41fe

@@ -293,13 +293,26 @@ To check whether a particular plugin is installed, use function e107::isInstalle
## Language Files and LANS
### Plugin Language-File Naming
Use the following path: _e107_plugins/YOUR_PLUGIN/languages/LANGUAGE/_
* English_front.php - used in front-end script.
* English_admin.php - used in admin script.
* English_global.php - used site-wide.
* English_log.php - used for logging.
### Loading Language-Files
To load a language file from the current theme's directory:
e107::lan('theme'); // loads e107_themes/CURRENT_THEME/languages/English.php (when English is selected)
To load a language file from a plugin folder:
e107::lan('gallery'); // loads e107_plugins/gallery/languages/English.php (when English is selected)
e107::lan('gallery'); // loads e107_plugins/gallery/languages/English_front.php (when English is selected)
e107::lan('gallery',true); // loads e107_plugins/gallery/languages/English_admin.php (when English is selected)
### Defining Language Terms aka 'LANS'
Avoid duplicating terms, particularly in the admin area. If coding for admin, always search lan_admin.php and the lan_xxxx.php of the specific page you are working on for existing LANs which may match what you need translated. Avoid using HTML or Urls inside LAN definitions.