Remove i18n, keep only Italian and rely on browser translation
The interface was translated in en/it/es/fr via @nuxtjs/i18n. Drop the module, the locale files, and the language switcher: the UI is now static Italian text, with translation for foreign visitors left to the Google Translate browser extension instead of the app.
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
/** Human-readable date for display; returns an empty string when unset. */
|
||||
export function formatDate(value: string | null | undefined, locale = 'en-GB'): string {
|
||||
export function formatDate(value: string | null | undefined): string {
|
||||
if (!value) return ''
|
||||
return new Intl.DateTimeFormat(locale, { dateStyle: 'long' }).format(new Date(value))
|
||||
return new Intl.DateTimeFormat('it-IT', { dateStyle: 'long' }).format(new Date(value))
|
||||
}
|
||||
|
||||
/** Date and time of publication, shown in the article byline. */
|
||||
export function formatDateTime(value: string | null | undefined, locale = 'en-GB'): string {
|
||||
export function formatDateTime(value: string | null | undefined): string {
|
||||
if (!value) return ''
|
||||
return new Intl.DateTimeFormat(locale, { dateStyle: 'long', timeStyle: 'short' })
|
||||
return new Intl.DateTimeFormat('it-IT', { dateStyle: 'long', timeStyle: 'short' })
|
||||
.format(new Date(value))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user