diff --git a/examples/react-ts/src/catchphrase.ts b/examples/react-ts/src/catchphrase.ts index a49fc83..4476edd 100644 --- a/examples/react-ts/src/catchphrase.ts +++ b/examples/react-ts/src/catchphrase.ts @@ -1,6 +1,6 @@ import { createCatchphrase } from "@catchphrase/core"; -type Languages = "en" | "de"; +type Languages = "en" | "de" | "fr"; const { createTranslation } = createCatchphrase({ languageSelector: () => { diff --git a/examples/react-ts/src/components/Greeting/Greeting.catchphrase.tsx b/examples/react-ts/src/components/Greeting/Greeting.catchphrase.tsx index 54626ff..8bb7897 100644 --- a/examples/react-ts/src/components/Greeting/Greeting.catchphrase.tsx +++ b/examples/react-ts/src/components/Greeting/Greeting.catchphrase.tsx @@ -6,9 +6,12 @@ type Translations = { export const GreetingTranslations = createTranslation(() => ({ en: { - Greeting: () => "Hello World!", + Greeting: () => "Hello World!" }, de: { - Greeting: () => "Hallo Welt!", + Greeting: () => "Hallo Welt!" }, + fr: { + Greeting: () => "Salut monde!" + } })); diff --git a/examples/react-ts/src/components/InformationText/InformationText.catchphrase.tsx b/examples/react-ts/src/components/InformationText/InformationText.catchphrase.tsx index a111268..3eba8e5 100644 --- a/examples/react-ts/src/components/InformationText/InformationText.catchphrase.tsx +++ b/examples/react-ts/src/components/InformationText/InformationText.catchphrase.tsx @@ -22,6 +22,13 @@ export const InformationTextTranslations = createTranslation( "Wenn du die Sprache deines Browsers änderst, ändern sich auch die Übersetzungen.", ThirdLine: () => "In diesem Beispiel wird nur Deutsch und Englisch unterstützt.", - }, + },fr:{ + FirstLine: () => + "Ces traductions dépendent de la langue de votre navigateur.", + SecondLine: () => + "Si vous changez la langue de votre navigateur, les traductions changeront également.", + ThirdLine: () => + "Dans cet exemple, seuls l'allemand et l'anglais sont pris en charge.", + } }), );