Locale
How to use?
The default locales
is defined in /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
}
If you want to add a new language add both locale
and locales
props.
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'