Location: PHPKode > scripts > MM::CLocalMessages > mm-clocalmessages/mmlocal.php
<?php
// ----------------------------------------------------------------------------
//
// This file is available under The MIT License
// http://www.sachenko.com
// Copyright (c) 2005 Vadim Sachenko
//
// ----------------------------------------------------------------------------


class CLocalMessages
{
	var $sDefaultLanguage = "en";
	
	var $sLanguage;

    var $aMessages = array
    (
        "en" => array
        (
            "ERROR" => "Error!",
            "COMMON_ERROR" => "Common error",
            "ERRORS_TITLE" => "ERRORS LOG",
            "MYSQL_CODE" => "Code",
            "MYSQL_MESSAGE" => "Message",
            "MYSQL_QUERY" => "Query",
            "TPL_EXPECTED" => "Expected",
            "TPL_ERROR" => "Template error",
            "TPL_NOT_FOUND" => "Template not found",
            "MAIL_TO" => "To",
            "MAIL_COPY" => "Copy",
            "MAIL_SUBJ" => "Subject",
            "MAIL_KB" => "kb",
            "MAIL_ATTACH" => "Attach"

        ),
        "ru" => array
        (
            "ERROR" => "Žè¨¡ª !",
            "COMMON_ERROR" => "Ž¡é ï ®è¨¡ª ",
            "ERRORS_TITLE" => "Ž˜ˆŠˆ",
            "MYSQL_CODE" => "Š®¤",
            "MYSQL_MESSAGE" => "‘®®¡é¥­¨¥",
            "MYSQL_QUERY" => "‡ ¯à®á",
            "TPL_EXPECTED" => "Ž¦¨¤ ¥âáï",
            "TPL_ERROR" => "Žè¨¡ª  è ¡«®­ ",
            "TPL_NOT_FOUND" => "˜ ¡«®­ ­¥ ­ ©¤¥­",
            "MAIL_TO" => "Š®¬ã",
            "MAIL_COPY" => "Š®¯¨ï",
            "MAIL_SUBJ" => "’¥¬ ",
            "MAIL_KB" => "Š",
            "MAIL_ATTACH" => "à¨á®¥¤¨­¨âì"
        )
    );
    
    function CLocalMessages($sLang)
    {
    	if($sLang)
    	{
	    	$this->sLanguage = $sLang;
	    }
	    else
	    {
	    	$this->sLanguage = $this->sDefaultLanguage;
	    }
    }
    
    function GetMessage($sID)
    {
    	return $this->aMessages[$this->sLanguage][$sID];
    }
}

$local_messages = new CLocalMessages(0);

?>
Return current item: MM::CLocalMessages