e4488a900b
* feat: add user locale preference to user_preferences table
- Introduced a new column 'locale' in the user_preferences table to store per-user UI language preferences.
- Added a CHECK constraint to ensure only supported locales ('sv', 'en') are allowed.
- Triggered a schema reload notification for the changes.
chore: declare CSS module support in TypeScript
- Added a declaration for CSS modules in globals.d.ts to enable TypeScript support for importing CSS files.
* feat: add Swish as an invoice payment method in company settings
10 lines
358 B
TypeScript
10 lines
358 B
TypeScript
export const SUPPORTED_LOCALES = ['sv', 'en'] as const
|
|
export type Locale = (typeof SUPPORTED_LOCALES)[number]
|
|
export const DEFAULT_LOCALE: Locale = 'sv'
|
|
|
|
export const LOCALE_COOKIE = 'gnubok-locale'
|
|
|
|
export function isLocale(value: unknown): value is Locale {
|
|
return typeof value === 'string' && (SUPPORTED_LOCALES as readonly string[]).includes(value)
|
|
}
|