def language_code(code):
    """Generate the ``cultureInfo`` language code for the API.

    Available codes are *EN* (default) and *ES*.

    Args:
        code (str): Two-character language code.

    Returns:
        str: Language code in the format accepted by the API.
    """
    if not code or code == 'es':
        return 'ES'
    return 'EN'
