X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flanguage-functions.php;h=f8e9d6162288b29089a2ba92f94bc9da481dc2ad;hb=739139fb13eae88204e355202bffe20ee5fc7d40;hp=0de23e3d2dbc86bc7b4da838ec8760302300aef3;hpb=adb34cea9c14bcac14030f8eb1e6ae2c3231c962;p=mailer.git diff --git a/inc/language-functions.php b/inc/language-functions.php index 0de23e3d2d..f8e9d61622 100644 --- a/inc/language-functions.php +++ b/inc/language-functions.php @@ -18,6 +18,7 @@ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * + * Copyright (c) 2009, 2010 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -60,6 +61,11 @@ function getMessage ($messageId) { return $return; } +// Getter for message string as a mask +function getMaskedMessage ($messageId, $data) { + return sprintf(getMessage($messageId), $data); +} + // Init messages function initMessages () { $GLOBALS['messages'][getLanguage()] = array(); @@ -105,9 +111,9 @@ function getLanguage () { if (isConfigEntrySet('DEFAULT_LANG')) $ret = getConfig('DEFAULT_LANG'); // Is the variable set - if (isGetRequestElementSet('mx_lang')) { + if (isGetRequestParameterSet('mx_lang')) { // Accept only first 2 chars - $ret = substr(getRequestElement('mx_lang'), 0, 2); + $ret = substr(getRequestParameter('mx_lang'), 0, 2); } elseif (isset($GLOBALS['language'])) { // Use cached $ret = getCurrentLanguage();