# Module Spec：vab-language（语言切换）

module:
  id: vab-language
  name: VabLanguage（语言切换）
  type: ui
  entrypoints:
    - library/components/VabLanguage/index.vue

public_api:
  concept:
    - "通过下拉菜单切换语言：更新 settings.language + i18n locale + document.title"

dependency_closure:
  runtime:
    - "store-settings：theme.showLanguage / changeLanguage(language)"
    - "vue-i18n：useI18n().locale"
    - "vue-router：useRoute（读取 route.meta.title）"
    - "utils/pageTitle：getPageTitle"
    - "Element Plus：el-dropdown/el-dropdown-menu/el-dropdown-item"
    - "VabIcon"

acceptance:
  - "theme.showLanguage=true 时显示入口"
  - "切换后 settings.language 与 i18n locale 同步更新"

pitfalls:
  - "document.title 依赖 route.meta.title；目标项目若 meta.title 缺失需适配"
