Skip to content

Commit

Permalink
feat: Add support for French translation in getTranslatableLink
Browse files Browse the repository at this point in the history
  • Loading branch information
iacopolea committed Oct 22, 2024
1 parent 8b23a4a commit 0ca68c4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/features/getTranslatableLink.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export default (
translatableLink: { en?: string; es?: string; it?: string } | undefined,
translatableLink:
| { en?: string; es?: string; it?: string; fr?: string }
| undefined,
language: string
) => {
if (typeof translatableLink === "undefined") {
Expand All @@ -14,5 +16,8 @@ export default (
if (language === "es" && translatableLink.es) {
return translatableLink.es;
}
if (language === "fr" && translatableLink.fr) {
return translatableLink.fr;
}
return "#";
};

0 comments on commit 0ca68c4

Please sign in to comment.