- Di {{ article.author }} + {{ t('byAuthor')(article.author) }}
-
diff --git a/frontend/app/composables/useLocale.ts b/frontend/app/composables/useLocale.ts new file mode 100644 index 0000000..ca2dba3 --- /dev/null +++ b/frontend/app/composables/useLocale.ts @@ -0,0 +1,21 @@ +import { STRINGS, type Strings } from '../i18n/strings' + +export type Locale = 'it' | 'en' + +/** + * Site language, persisted in a cookie so SSR renders the right language on + * the first request. `t(key)` reads the current locale's UI string. + */ +export function useLocale() { + const locale = useCookie
- Articoli, guide e analisi.
+{{ t('tagline') }}
- © {{ new Date().getFullYear() }} {{ SITE_NAME }}. Tutti i diritti riservati. + © {{ new Date().getFullYear() }} {{ SITE_NAME }}. {{ t('footerRights') }}
- Di {{ article.author }} + {{ t('byAuthor')(article.author) }}
-
L'archivio
-{{ t('archiveKicker') }}
+Non è stato possibile caricare gli articoli. Riprova più tardi.
+{{ t('loadError') }}
-Caricamento…
+{{ t('loading') }}
-Non è stato ancora pubblicato nulla.
+{{ t('noArticlesYet') }}
Categoria
+{{ t('categoryKicker') }}
Non è stato possibile caricare gli articoli. Riprova più tardi.
+{{ t('loadError') }}
-Non ci sono articoli in questa categoria.
+{{ t('noArticlesInCategory') }}