public function translate($string, $namespace, $arguments = array())
    {
        // Load the language file for the given namespace if the language file isn't loaded
        if (!isset($this->translatedStrings[$namespace]) || !is_array($this->translatedStrings[$namespace])) {
            $this->loadLanguageFileForNamespace($namespace);
        }
        
        // If no translation for the original string is available or the string is not translated 
        // return the original string to the caller.
        if (!isset($this->translatedStrings[$namespace][$string]) || $this->translatedStrings[$namespace][$string] == '') {
            return $this->replacePlaceholders($string, $arguments);
        }
        
        return $this->replacePlaceholders($this->translatedStrings[$namespace][$string], $arguments);
    }