mirror of
https://github.com/e107inc/e107.git
synced 2025-08-07 15:16:30 +02:00
Updated e107 Coding Standard (markdown)
@@ -314,12 +314,15 @@ To load a language file from a plugin folder:
|
|||||||
|
|
||||||
### Defining Language Terms aka 'LANS'
|
### 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.
|
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.
|
||||||
|
Also, use double quotes within the defines and use str_replace where needed. See the examples below:
|
||||||
|
|
||||||
**Good:**
|
**Good:**
|
||||||
|
|
||||||
define("LAN_XXX", "Thank you [b]Firstname[/b]");
|
define("LAN_XXX", "Thank you [b]Firstname[/b]");
|
||||||
define("LAN_XXX", "Thank you [x]"); // Good - replace [ and ] with <a href='...'> and </a> using str_replace()
|
define("LAN_XXX", "Go to [x] to see the results."); // Good - replace [ and ] with <a href='...'> and </a> using str_replace()
|
||||||
|
define("LAN_XXX", "I want to [quote] here"); // Good - replace [ and ] with " " using str_replace()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**Bad:**
|
**Bad:**
|
||||||
|
Reference in New Issue
Block a user