Implementation:Elevenlabs Elevenlabs python WidgetTextContents
| Metadata | Value |
|---|---|
| source | Elevenlabs_Elevenlabs_python |
| domain | Widget Configuration, Localization |
| last_updated | 2026-02-15 |
Overview
Description: WidgetTextContents is a Pydantic model that defines all user-facing text strings and ARIA labels used within an ElevenLabs conversational AI widget. It provides comprehensive localization support by allowing every text element in the widget UI to be customized, including button labels, status messages, input placeholders, feedback prompts, and accessibility labels.
Usage: This model is used as part of the widget configuration (referenced by WidgetConfigResponse and WidgetLanguagePresetResponse) to define localized text content. Each field corresponds to a specific UI element in the widget, enabling full internationalization of the conversational interface.
Code Reference
Source file: src/elevenlabs/types/widget_text_contents.py
Class signature:
class WidgetTextContents(UncheckedBaseModel):
...
Import statement:
from elevenlabs.types import WidgetTextContents
I/O Contract
| Field | Type | Required | Description |
|---|---|---|---|
| main_label | Optional[str] | No | Call to action displayed inside the compact and full variants |
| start_call | Optional[str] | No | Text and ARIA label for the start call button |
| start_chat | Optional[str] | No | Text and ARIA label for the start chat button (text only) |
| new_call | Optional[str] | No | Text and ARIA label for the new call button |
| end_call | Optional[str] | No | Text and ARIA label for the end call button |
| mute_microphone | Optional[str] | No | ARIA label for the mute microphone button |
| change_language | Optional[str] | No | ARIA label for the change language dropdown |
| collapse | Optional[str] | No | ARIA label for the collapse button |
| expand | Optional[str] | No | ARIA label for the expand button |
| copied | Optional[str] | No | Text displayed when the user copies a value using the copy button |
| accept_terms | Optional[str] | No | Text and ARIA label for the accept terms button |
| dismiss_terms | Optional[str] | No | Text and ARIA label for the cancel terms button |
| listening_status | Optional[str] | No | Status displayed when the agent is listening |
| speaking_status | Optional[str] | No | Status displayed when the agent is speaking |
| connecting_status | Optional[str] | No | Status displayed when the agent is connecting |
| chatting_status | Optional[str] | No | Status displayed when the agent is chatting (text only) |
| input_label | Optional[str] | No | ARIA label for the text message input |
| input_placeholder | Optional[str] | No | Placeholder text for the text message input |
| input_placeholder_text_only | Optional[str] | No | Placeholder text for the text message input (text only) |
| input_placeholder_new_conversation | Optional[str] | No | Placeholder text for the text message input when starting a new conversation (text only) |
| user_ended_conversation | Optional[str] | No | Information message displayed when the user ends the conversation |
| agent_ended_conversation | Optional[str] | No | Information message displayed when the agent ends the conversation |
| conversation_id | Optional[str] | No | Text label used next to the conversation ID |
| error_occurred | Optional[str] | No | Text label used when an error occurs |
| copy_id | Optional[str] | No | Text and ARIA label used for the copy ID button |
| initiate_feedback | Optional[str] | No | Text displayed to prompt the user for feedback |
| request_follow_up_feedback | Optional[str] | No | Text displayed to request additional feedback details |
| thanks_for_feedback | Optional[str] | No | Text displayed to thank the user for providing feedback |
| thanks_for_feedback_details | Optional[str] | No | Additional text displayed explaining the value of user feedback |
| follow_up_feedback_placeholder | Optional[str] | No | Placeholder text for the follow-up feedback input field |
| submit | Optional[str] | No | Text and ARIA label for the submit button |
| go_back | Optional[str] | No | Text and ARIA label for the go back button |
Usage Examples
from elevenlabs.types import WidgetTextContents
# Create localized text contents for a Spanish widget
text_contents = WidgetTextContents(
main_label="Habla con nuestro asistente",
start_call="Iniciar llamada",
end_call="Finalizar llamada",
listening_status="Escuchando...",
speaking_status="Hablando...",
connecting_status="Conectando...",
input_placeholder="Escribe tu mensaje...",
accept_terms="Aceptar",
dismiss_terms="Cancelar",
)
# Access individual text fields
print(text_contents.main_label)
print(text_contents.start_call)