Skip to main content

Available props

You can pass these props to Talkr's provider:

languages ({ [key: string]: string })

object containing all your json files. Typical format: {en: {...}, fr: {...}}

defaultLanguage (string)

default language of your app (a similar key must be included in the language prop)

detectBrowserLanguage (boolean)

if true, Talkr will automatically use browser language and override the defaultLanguage. If the browser language is not included in your available translations, it will switch back to defaultLanguage. Not available in React Native. Use expo-localization to fetch the default user locale instead.

🤓: The auto-detect language feature will always return a simple key such as fr instead of fr_FR. Keep things simple and always declare your languages with 2 letters.