vue-i18n-best-practices.mdc 484 B

12345678910
  1. ---
  2. description: Best practices for Vue I18n internationalization
  3. globs: *.vue,*.ts
  4. alwaysApply: false
  5. ---
  6. - Use Vue I18n for managing translations
  7. - Use `const { t } = useI18n()` in Vue components to use t('area.areaType') as a placeholder
  8. - The global I18N translation files are in `src/i18n`
  9. - The Chinese and English I18N file names use 'zh-cn.ts' and' en.ts' and save them in the 'i18n' folder in the current directory
  10. - The key values in the language file are named by the hump