Auto-Translate
You can dynamically enable auto-translation of incoming messages in the chat by passing autotranslate=true
and lang
as URL parameters.
How It Works
- When the URL includes the parameter
autotranslate=true
, all incoming messages in the chat will be automatically translated. - Messages are translated into the language specified by the
lang
parameter. - If
lang
is not provided, the default project language will be used. - Auto-translation is only active for the current session. The user’s settings are not changed.
Respecting User Preferences
- If the user already has auto-translation enabled in their settings, the
autotranslate=true
parameter is ignored. - If the user has auto-translation disabled, but the
autotranslate=true
parameter is present, auto-translation will be temporarily activated for this session only — without modifying the user's preferences.
Example
https://chat.watchers.io/?roomId=1234&apikey={project-api-key}&userId=1234&autotranslate=true&lang=es
This URL activates auto-translation into Spanish for the current session, unless the user has explicitly disabled auto-translation in their personal settings.
Updated 9 days ago