Reading-free geographic language selection for React apps.
Show users a globe. Let them tap their country. Hear their language spoken.
No reading required — ever.
npm install geolingua three
threeandreact/react-domare peer dependencies.
import { GeoLingua } from 'geolingua';
function App() {
const handleLanguageSelect = (locale) => {
i18n.changeLanguage(locale);
};
return <GeoLingua appName="MyApp" onLanguageSelect={handleLanguageSelect} />;
}import { GeoLingua } from 'geolingua';
<GeoLingua theme="space" onLanguageSelect={handleLanguageSelect} />
// or: theme="fresco" (default) | "minimal" | "a11y"
// or: theme={customThemeObject}Standard language selectors require users to read a dropdown list. GeoLingua solves the bootstrap paradox: how do you select a language before you can read the interface?
The answer: geography is universal. Everyone knows where they live.
GeoLingua includes a microphone button for voice-based language detection:
- Tier 1 (free): Uses browser SpeechRecognition with script-based heuristics
- Tier 2 (API key): OpenAI Whisper or Azure Cognitive Services for high accuracy
<GeoLingua
voiceDetection={{ provider: 'whisper', openaiApiKey: 'sk-...' }}
onLanguageSelect={handleLanguageSelect}
/>import { useGeoLingua } from 'geolingua';
const { state, handleCountryClick, handleLanguageSelect } = useGeoLingua({
appName: 'MyApp',
onLanguageSelect: (locale) => console.log(locale),
});- ProtoViz — Interactive protocol visualization for network engineers
See the full documentation for props, integration patterns, and advanced usage.
Open source · MIT · github.com/provandal/geolingua
Created by Erik Smith