Open Source

The Most Comprehensive Language Selector

Production-ready language selector components for modern web applications. Built with accessibility and internationalization in mind.

View Component Playground
Try the component
3 languages, no flags, dropdown, small

6 languages, single flag, no english name, dropdown

12 languages, single flag, modal

20 languages, multi flag, regions, and scripts
7000+ Languages (Really!)
200+ Flags
400+ Endonyms

Installation

A drop-in language selector widget you can add to any website.

Component Library

pnpm add language-selector-react

Usage:

import { LanguageSelector } from 'language-selector-react';

export default function App() {
  return <LanguageSelector languages={["en", "es", "fr", "de"]} />;
}

HTML Embed

Add to any website with a single script tag

<script src="https://lsapi.casholab.com/embed/loader.js"></script>

Then add an element:

<div casholab-ls languages="en,es,fr,de"></div>

Why Use a Component Library?

Without
  • Build language data from scratch
  • Handle 7000+ ISO language codes
  • Source and maintain flag assets
  • Implement endonym display
  • Handle regions & scripts (zh-TW, sr-Latn)
  • Accessibility concerns
  • Edge cases & browser quirks
With Language Selector
  • One import, one component
  • All languages built-in
  • Flags included
  • Endonyms handled
  • Full region & script support
  • Offline mode supported

FAQ