Skip to content

Locales and labels ​

Course materials (demo)Demo data
Actions
No files
0 loaded file(s) · 0 B total
md
<FileList locale="en-US" base="https://pan.example.com" />

The demo data (no base) follows locale too: English folder and file names with en-US.

Override single labels on top of a preset:

md
<FileList
  locale="en-US"
  :labels="{ batch: 'Download all', loaded: '{count} files' }"
  base="https://pan.example.com"
/>

Built-in presets: zh-CN and en-US. Placeholders {count}, {percent}, {message} and {name} are filled by formatLabel(). The full list of keys is the exported FileListLabels type:

ts
import type { FileListLabels } from 'vitepress-plugin-filelist/client'
import { fileListLocales, formatLabel, resolveLabels } from 'vitepress-plugin-filelist/client'

MIT License