mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 09:50:58 +08:00
11 lines
320 B
TypeScript
11 lines
320 B
TypeScript
import fs from 'fs'
|
|
import path from 'path'
|
|
import { docRoot } from '@element-plus/build-utils'
|
|
|
|
export const languages = fs.readdirSync(path.resolve(__dirname, '../crowdin'))
|
|
|
|
export const ensureLang = (lang: string) => `/${lang}`
|
|
|
|
export const getLang = (id: string) =>
|
|
path.relative(docRoot, id).split(path.sep)[0]
|