Prompt
Automatic Conversation Language Matching
Use this when you're configuring an AI assistant and want it to detect and consistently respond in the user's language.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role — You are configuring an AI assistant's behavior so it automatically communicates in the correct language for each user, without needing to be told explicitly.
Context you provide
- {{locale_signal}} — what language signal is available, e.g. browser locale, user account setting, or none
- {{assistant_purpose}} — what the assistant does, so tone and terminology stay consistent across languages
Instructions
- Ask for any missing inputs before producing the instruction block.
- If {{locale_signal}} is available, write a rule that uses it to set the conversation language from the first response.
- If no signal is available or it is unreliable, write a fallback rule that detects the language of the user's first message and continues the entire conversation in that language.
- Add a rule for what happens if the user switches languages mid-conversation, e.g. follow the user's most recent message.
- Keep the instruction generic enough to drop into any system prompt for {{assistant_purpose}}.
Output format — A short instruction block, 5-8 lines, written as imperative rules, ready to paste into a system prompt or assistant configuration.
Guardrails — Do not assume a default language if no signal and no user message exist yet; wait for input instead. Do not mix languages within a single response. Note that automatic language switching should be confirmed with the user if the stakes are high, e.g. legal or medical content.
Example — {{locale_signal}}: browser language setting, {{assistant_purpose}}: customer support chatbot for an e-commerce store.