mirror of
https://github.com/spliit-app/spliit.git
synced 2026-02-14 19:46:12 +01:00
* Add Romanian translations Create ro.json. * Add ro option. Add ro option. * Update ro.json * Prettier --------- Co-authored-by: Sebastien Castiel <sebastien@castiel.me>
28 lines
555 B
TypeScript
28 lines
555 B
TypeScript
import { getRequestConfig } from 'next-intl/server'
|
|
import { getUserLocale } from './lib/locale'
|
|
|
|
export const locales = [
|
|
'en-US',
|
|
'fi',
|
|
'fr-FR',
|
|
'es',
|
|
'de-DE',
|
|
'zh-CN',
|
|
'ru-RU',
|
|
'it-IT',
|
|
'ua-UA',
|
|
'ro',
|
|
] as const
|
|
export type Locale = (typeof locales)[number]
|
|
export type Locales = ReadonlyArray<Locale>
|
|
export const defaultLocale: Locale = 'en-US'
|
|
|
|
export default getRequestConfig(async () => {
|
|
const locale = await getUserLocale()
|
|
|
|
return {
|
|
locale,
|
|
messages: (await import(`../messages/${locale}.json`)).default,
|
|
}
|
|
})
|