Giao diện
i18n & Localization
TÓM TẮT
BoxMe Forecast hỗ trợ 3 ngôn ngữ: English (55KB), Tiếng Việt (63KB), Thai (78KB). Sử dụng i18next + react-i18next + i18next-browser-languagedetector.
Stack
| Package | Version | Mô tả |
|---|---|---|
i18next | 23.10 | Core i18n framework |
react-i18next | 14.0 | React hooks & components |
i18next-browser-languagedetector | 7.2 | Auto-detect browser language |
Locale Files
| File | Size | Ngôn ngữ |
|---|---|---|
locales/en.ts | 55KB | English |
locales/vi.ts | 63KB | Tiếng Việt |
locales/th.ts | 78KB | Thai |
Sử dụng
typescript
import { useTranslation } from 'react-i18next';
const Component = () => {
const { t } = useTranslation();
return <h1>{t('dashboard.title')}</h1>;
};Language Switcher
Component LanguageSwitcher.tsx (2.7KB) cho phép user chọn ngôn ngữ.