public function setLanguage($language)
    {
        if ($language == $this->currentLanguage) {
            return;
        }

        if (!$this->isLoaded($language)) {
            $this->loadLanguage($language);
        }

        switch ($language) {
            case 'fr':
                setlocale(LC_ALL, 'fr_FR.utf8', 'fr_FR.UTF-8', 'fr_FR@euro', 'fr_FR', 'french');
                break;
            case 'en':
                setlocale(LC_ALL, 'en_US.utf8', 'en_US.UTF-8', 'en_US');
                break;
            case 'de':
                setlocale(LC_ALL, 'de_DE.utf8', 'de_DE.UTF-8', 'de_DE@euro', 'de_DE', 'deutsch');
                break;
        }

        $this->currentLanguage = $language;
        $this->currentLanguageId = $this->languagesIso[$language]['id'];
    }