Having an array of parameters, replacing them to %s's in an order
<p>I have a static class like this. </p>

<pre><code>&lt;?php

class Language
{
    public static $language = array();
    var $config;

    function __construct($config)
    {
        switch(strtoupper($config['LANGUAGE']))
        {
            case 'ENGLISH':
                self::setEnglish();
                break;

            case 'TURKISH':
                self::setTurkish();
                break;

            default:
                self::setEnglish();
        }
    }

    public static function setEnglish()
    {
        self::$language = array(

                'CHAIN_VALIDATOR_INITIALIZED' =&gt; 'ChainValidator initialized!',
                'ERROR_FUNCTION_RETURNED_FALSE' =&gt; 'A function returned false.',
            );
    }

    public static function setTurkish()
    {
        self::$language = array(

                'CHAIN_VALIDATOR_INITIALIZED' =&gt; 'ChainValidator çalışıyor!',
                'ERROR_FUNCTION_RETURNED_FALSE' =&gt; 'Bir fonksiyon false döndürdü.',
            );
    }

    public static function getLanguage($key)
    {
        return isset(self::$language[$key]) ? self::$language[$key] : $key;
    }
}

?&gt;
</code></pre>

<p>It is being used like this,</p>

<pre><code>Language::getLanguage('CHAIN_VALIDATOR_INITIALIZED')
</code></pre>

<p>but I have to pass more parameters. Similar to this,</p>

<pre><code>Language::getLanguage('CHAIN_VALIDATOR_INITIALIZED', array(__FUNCTION__))
</code></pre>

<p>These parameters should be passed in an order, like %s. Final look should look like this:</p>

<pre><code> "A function returned false" to;
 "%s function returned false"

 And output would be;
 "myLovelyFunction() returned false" (the first array parameter, which is __FUNCTION__)
</code></pre>

<p>Sounds like piece of cake my brain stopped atm.</p>

<p>How can I do this?</p>
