Skip to content

Commit

Permalink
Added new translations for french language.
Browse files Browse the repository at this point in the history
  • Loading branch information
atousignant committed Oct 28, 2023
1 parent a90d699 commit e972423
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/react-ts/src/catchphrase.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createCatchphrase } from "@catchphrase/core";

type Languages = "en" | "de";
type Languages = "en" | "de" | "fr";

const { createTranslation } = createCatchphrase<Languages>({
languageSelector: () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ type Translations = {

export const GreetingTranslations = createTranslation<Translations>(() => ({
en: {
Greeting: () => "Hello World!",
Greeting: () => "Hello World!"
},
de: {
Greeting: () => "Hallo Welt!",
Greeting: () => "Hallo Welt!"
},
fr: {
Greeting: () => "Salut monde!"
}
}));
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ export const InformationTextTranslations = createTranslation<Translations>(
"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.",
}
}),
);

0 comments on commit e972423

Please sign in to comment.