Vue Pivottable (Vue2)Vue Pivottable (Vue2)
  • 소개
  • 시작하기
  • 언어 설정
  • 슬롯
  • 범위가 지정된 슬롯
  • 유틸리티
  • 렌더러
  • Props 참조
  • 스타일링
  • v1.x (Vue 3)
기여하기 💚
  • English
  • 한국어
GitHub
  • 소개
  • 시작하기
  • 언어 설정
  • 슬롯
  • 범위가 지정된 슬롯
  • 유틸리티
  • 렌더러
  • Props 참조
  • 스타일링
  • v1.x (Vue 3)
기여하기 💚
  • English
  • 한국어
GitHub
  • 가이드

    • 소개
    • 시작하기
  • 심화

    • 언어 설정
    • 슬롯
    • 범위가 지정된 슬롯
    • 유틸리티
    • 렌더러
  • Props
  • 스타일링

언어 설정

사용 방법

기본 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'

예제

GitHub에서 이 페이지 편집하기
마지막 업데이트: 25. 5. 1. 오전 1:57
기여자: Seungwoo321
Next
슬롯