diff options
author | Armand Philippot | 2025-07-12 12:31:03 +0200 |
---|---|---|
committer | GitHub | 2025-07-12 12:31:03 +0200 |
commit | 5cba9fe7d0b335ffc1c0bf34d35ccad39c277923 (patch) | |
tree | 9dde14e0f4e34273448a06598ddc9008e9852fb0 | |
parent | c07478ba8480b24c4c967dd660a39b844f3900fc (diff) | |
download | IT.starlight-5cba9fe7d0b335ffc1c0bf34d35ccad39c277923.tar.gz IT.starlight-5cba9fe7d0b335ffc1c0bf34d35ccad39c277923.tar.bz2 IT.starlight-5cba9fe7d0b335ffc1c0bf34d35ccad39c277923.zip |
i18n(fr): update `guides/i18n.mdx` (#3294)
Co-authored-by: HiDeoo <494699+HiDeoo@users.noreply.github.com>
-rw-r--r-- | docs/src/content/docs/fr/guides/i18n.mdx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/src/content/docs/fr/guides/i18n.mdx b/docs/src/content/docs/fr/guides/i18n.mdx index 084d0094..f7681828 100644 --- a/docs/src/content/docs/fr/guides/i18n.mdx +++ b/docs/src/content/docs/fr/guides/i18n.mdx @@ -360,15 +360,15 @@ const allStrings = Astro.locals.t.all(); #### `t.exists()` -Pour vérifier si une clé de traduction existe pour une langue, utilisez la fonction `locals.t.exists()` avec la clé de traduction comme premier argument. -Passez un deuxième argument facultatif si vous avez besoin de re-définir la langue actuelle. +Pour vérifier si une clé de traduction existe, utilisez la fonction `locals.t.exists()` avec la clé de traduction comme premier argument. +Passez un deuxième argument facultatif si vous avez besoin de vérifier qu'une traduction existe pour une langue spécifique. ```astro --- // src/components/Exemple.astro -const keyExistsInCurrentLocale = Astro.locals.t.exists('a.key'); +const keyExists = Astro.locals.t.exists('a.key'); // ^ true -const keyExistsInFrench = Astro.locals.t.exists('another.key', { lng: 'fr' }); +const keyExistsInFrench = Astro.locals.t.exists('other.key', { lngs: ['fr'] }); // ^ false --- ``` |