world-game/src/i18n/index.js

91 lines
3.6 KiB
JavaScript
Raw Normal View History

import { locale } from "@state/locale.svelte";
const dict = {
// Article
published_on: { fr: "Publié le", en: "Published on" },
link_copied: { fr: "Lien copié !", en: "Link copied!" },
copy_link: { fr: "Copier le lien", en: "Copy link" },
share_article: { fr: "Partager cet article", en: "Share this article" },
related: { fr: "Nos recommandations", en: "Our recommendations" },
share_whatsapp: { fr: "Partager sur WhatsApp", en: "Share on WhatsApp" },
share_x: { fr: "Partager sur X", en: "Share on X" },
share_facebook: { fr: "Partager sur Facebook", en: "Share on Facebook" },
share_linkedin: { fr: "Partager sur LinkedIn", en: "Share on LinkedIn" },
// Blog
loading: { fr: "Chargement…", en: "Loading…" },
read_article: { fr: "Lire l'article", en: "Read article" },
// Play
play: { fr: "Jouer", en: "Play" },
coming_soon: { fr: "Coming soon", en: "Coming soon" },
// Header
close_menu: { fr: "Fermer le menu", en: "Close menu" },
open_menu: { fr: "Ouvrir le menu", en: "Open menu" },
// Footer
location: { fr: "Adresse", en: "Location" },
contact: { fr: "Contactez-nous", en: "Contact" },
follow_us: { fr: "Suivez-nous", en: "Follow us" },
newsletter_heading: {
fr: "Abonnez-vous à nos newsletters !",
en: "Subscribe to our newsletters!",
},
newsletter_placeholder: { fr: "Votre email", en: "Enter your email" },
newsletter_submit: { fr: "S'inscrire", en: "Subscribe" },
newsletter_success: {
fr: "Merci pour votre inscription !",
en: "Thank you for subscribing!",
},
newsletter_error: {
fr: "Une erreur est survenue.",
en: "An error occurred.",
},
copyright: {
fr: "World Game © {year}. Tous droits réservés.",
en: "World Game © {year}. All rights reserved.",
},
legal: { fr: "Mentions légales", en: "Legal notice" },
cookies: { fr: "Préférences cookies", en: "Cookie preferences" },
privacy: { fr: "Confidentialité", en: "Privacy" },
// About
our_team: { fr: "NOTRE ÉQUIPE", en: "OUR TEAM" },
// White Papers
white_paper_label: { fr: "LIVRE BLANC", en: "WHITE PAPER" },
read_wp: { fr: "Télécharger", en: "Download" },
wp_form_intro: {
fr: "Renseignez vos informations pour télécharger notre livre blanc.",
en: "Fill in your information to download our white paper.",
},
wp_firstname: { fr: "Prénom*", en: "First name*" },
wp_lastname: { fr: "Nom*", en: "Last name*" },
wp_company: { fr: "Société", en: "Company" },
wp_role: { fr: "Fonction", en: "Role" },
wp_email: { fr: "E-mail*", en: "E-mail*" },
wp_consent: {
fr: "En cochant cette case, j'accepte d'être recontacté par la société World Game. Mes données ne seront ni vendues, ni partagées.",
en: "By checking this box, I agree to be contacted by World Game. My data will not be sold or shared.",
},
wp_download: { fr: "TÉLÉCHARGER", en: "DOWNLOAD" },
wp_success: {
fr: "Votre demande a été enregistrée. Le téléchargement devrait démarrer.",
en: "Your request has been registered. The download should start.",
},
wp_error: {
fr: "Une erreur est survenue, veuillez réessayer.",
en: "An error occurred, please try again.",
},
// Menu
menu: { fr: "MENU", en: "MENU" },
connect: { fr: "CONNECT", en: "CONNECT" },
address: { fr: "ADRESSE", en: "LOCATION" },
mail: { fr: "MAIL", en: "MAIL" },
socials: { fr: "RÉSEAUX", en: "SOCIALS" },
};
export function t(key, vars = {}) {
const lang = locale.current;
let str = dict[key]?.[lang] ?? dict[key]?.fr ?? key;
for (const [k, v] of Object.entries(vars)) {
str = str.replace(`{${k}}`, v);
}
return str;
}