public static function setLanguage($language)
    {
        // regex source: http://www.w3.org/TR/xmlschema11-2/#language
        if (preg_match('/[a-z]{1,8}(-[a-z0-9]{1,8})*/i', $language) === 1) {
            self::$language = $language;
        } else {
            trigger_error('Invalid language tag: ' . $language, E_USER_WARNING);
        }
    }