Files
pos-system/apps/web-client/src/i18n/config.ts
Ho Ngoc Hai f43aec8a03 Implement internationalization support and enhance user experience in web-client
- Added `next-intl` dependency for improved internationalization capabilities.
- Integrated translation hooks across various components, including authentication, chat, and settings, to support dynamic language switching.
- Updated UI elements to utilize translated strings for better accessibility and user experience.
- Refactored forms and validation schemas to include localized messages for error handling and user prompts.
- Enhanced chat functionality with localized messages for actions and notifications.

These changes aim to provide a more inclusive experience for users by supporting multiple languages and improving overall usability.
2026-01-02 10:06:22 +07:00

31 lines
655 B
TypeScript

/**
* EN: i18n configuration for next-intl
* VI: Cấu hình i18n cho next-intl
*/
/**
* EN: Supported locales
* VI: Các ngôn ngữ được hỗ trợ
*/
export const locales = ['en', 'vi'] as const;
/**
* EN: Default locale
* VI: Ngôn ngữ mặc định
*/
export const defaultLocale = 'en' as const;
/**
* EN: Locale type
* VI: Kiểu locale
*/
export type Locale = (typeof locales)[number];
/**
* EN: Check if a string is a valid locale
* VI: Kiểm tra xem một chuỗi có phải là locale hợp lệ không
*/
export function isValidLocale(locale: string): locale is Locale {
return locales.includes(locale as Locale);
}