diff options
author | Laria Carolin Chabowski <laria@laria.me> | 2020-04-26 21:03:08 +0200 |
---|---|---|
committer | Laria Carolin Chabowski <laria@laria.me> | 2020-04-26 21:13:51 +0200 |
commit | ade9edeb849803082856f7633194913ad4df93a0 (patch) | |
tree | a864c593f92851678d7ab9fe4e7e9cfdefb539c8 /ratatoeskr/sys/translation.php | |
parent | c3cc300a952a793b9655226db1aad050daaa3803 (diff) | |
download | ratatoeskr-cms-ade9edeb849803082856f7633194913ad4df93a0.tar.gz ratatoeskr-cms-ade9edeb849803082856f7633194913ad4df93a0.tar.bz2 ratatoeskr-cms-ade9edeb849803082856f7633194913ad4df93a0.zip |
Automatic code formatting
Diffstat (limited to 'ratatoeskr/sys/translation.php')
-rw-r--r-- | ratatoeskr/sys/translation.php | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/ratatoeskr/sys/translation.php b/ratatoeskr/sys/translation.php index 1506543..30f32e3 100644 --- a/ratatoeskr/sys/translation.php +++ b/ratatoeskr/sys/translation.php @@ -12,23 +12,23 @@ require_once(dirname(__FILE__) . "/utils.php"); require_once(dirname(__FILE__) . "/init_ste.php"); -if(!defined("SETUP")) +if (!defined("SETUP")) { require_once(dirname(__FILE__) . "/models.php"); +} -if(!defined("TRANSLATION_PLUGIN_LOADED")) -{ +if (!defined("TRANSLATION_PLUGIN_LOADED")) { $ste->register_tag( "get_translation", - function($ste, $params, $sub) - { + function ($ste, $params, $sub) { global $translation; - if((!isset($translation)) or empty($params["for"]) or (!isset($translation[$params["for"]]))) + if ((!isset($translation)) or empty($params["for"]) or (!isset($translation[$params["for"]]))) { return ""; + } $rv = $translation[$params["for"]]; return (!empty($params["raw"])) ? $rv : htmlesc($rv); } ); - define("TRANSLATION_PLUGIN_LOADED", True); + define("TRANSLATION_PLUGIN_LOADED", true); } /* @@ -38,18 +38,17 @@ if(!defined("TRANSLATION_PLUGIN_LOADED")) * Parameters: * $lang - The language (2-Letter code, e.g. "en", "de", "it" ...) to load. NULL for default (from database). */ -function load_language($lang=NULL) +function load_language($lang=null) { - if(!defined("SETUP")) - { + if (!defined("SETUP")) { global $ratatoeskr_settings; - if($lang === NULL) + if ($lang === null) { $lang = $ratatoeskr_settings["default_language"]; - } - else - { - if($lang === NULL) + } + } else { + if ($lang === null) { $lang = "en"; + } } /* |