언어 설정
사용 방법
기본 locales
는 /src/helper/utils.js 파일에 정의되어 있습니다.
const locales = {
en: {
aggregators,
localeStrings: {
renderError: 'An error occurred rendering the PivotTable results.',
computeError: 'An error occurred computing the PivotTable results.',
uiRenderError: 'An error occurred rendering the PivotTable UI.',
selectAll: 'Select All',
selectNone: 'Select None',
tooMany: '(too many to list)',
filterResults: 'Filter values',
totals: 'Totals',
vs: 'vs',
by: 'by'
}
}
}
export {
locales
}
새로운 언어를 추가하려면 locale
과 locales
속성을 모두 설정해야 합니다.
import { PivotUtilities } from "vue-pivottable";
const locales = {
en: PivotUtilities.locales.en,
ko: {
aggregators: PivotUtilities.aggregators,
localeStrings: {
renderError:
"피벗 테이블 결과를 렌더링하는 동안 오류가 발생 했습니다.",
computeError:
"피벗 테이블 결과를 계산하는 동안 오류가 발생 했습니다.",
uiRenderError:
"피벗 테이블 UI를 렌더링하는 동안 오류가 발생 했습니다.",
selectAll: "모두 선택",
selectNone: "선택 안함",
tooMany: "표시 할 값이 너무 많습니다.",
filterResults: "값 필터링",
totals: "합계",
only: "단독",
vs: "vs",
by: "by",
},
},
}
const locale = 'en' // or 'ko'