Support 5 languages automatically (EN, FR, ES, DE, PT)
You can force a specific language globally in your Provider:
1<ProofConvertProvider
2 projectId="..."
3 apiKey="..."
4 locale="fr" // 'en', 'fr', 'es', 'de', 'pt'
5>
6 <App />
7</ProofConvertProvider>Want to let users change the language? Use the setLocale hook:
1function LanguageSelector() {
2 const { setLocale, getLocale } = useProofConvert();
3
4 return (
5 <select
6 value={getLocale()}
7 onChange={(e) => setLocale(e.target.value)}
8 >
9 <option value="en">🇬🇧 English</option>
10 <option value="fr">🇫🇷 Français</option>
11 <option value="es">🇪🇸 Español</option>
12 <option value="de">🇩🇪 Deutsch</option>
13 <option value="pt">🇵🇹 Português</option>
14 </select>
15 );
16}