Skip to content

Conversation

@Pankajyadav919
Copy link

What

  • Uses navigator.language to set the default "Translate To" language
  • Normalizes locale to ISO-639-1
  • Falls back to English if no translation model exists

Why

Improves UX by respecting the user’s browser language instead of always defaulting to English.

How

  • Detects browser language
  • Validates against available translation models
  • Preserves existing manual language selection behavior

Testing

  • Browser language supported → auto-selected
  • Unsupported language → falls back to English
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant