Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added new translations for french language. #180

Merged
merged 1 commit into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.",
}
}),
);
Loading