def language_to_flag(code):
    """Generates css flag class for the language code"""
    if code.lower() == 'en':
        return 'flag-icon flag-icon-us'
    return 'flag-icon flag-icon-' + code.lower()