From 0a571daa60c013f2d4bd2ab6d5bdcb59008fd07a Mon Sep 17 00:00:00 2001 From: Moc Date: Sun, 31 Mar 2013 03:40:51 -0700 Subject: [PATCH] Updated e107 Coding Standard (markdown) --- e107-Coding-Standard.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/e107-Coding-Standard.md b/e107-Coding-Standard.md index 60e0934..4cbdeec 100644 --- a/e107-Coding-Standard.md +++ b/e107-Coding-Standard.md @@ -314,12 +314,15 @@ To load a language file from a plugin folder: ### 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:** define("LAN_XXX", "Thank you [b]Firstname[/b]"); - define("LAN_XXX", "Thank you [x]"); // Good - replace [ and ] with and using str_replace() + define("LAN_XXX", "Go to [x] to see the results."); // Good - replace [ and ] with and using str_replace() + define("LAN_XXX", "I want to [quote] here"); // Good - replace [ and ] with " " using str_replace() + **Bad:**