Adjust the config file.
- Put the config javascript file inside your page. Use only one config file.
- This file must be placed before the Tbs Grid javascript files.
// Samples
<script src="/tbs.grid/tbs.grid.configs.js"></script>
// Tbs Grid
<script src="/tbsgrid/tbs.grid.min.js"></script>
- Set up country-specific config files.
// Samples
tbsGridConfigs.ko = {
culture: {
name: 'ko',
language: 'ko',
currencyChar: '₩',
decimalChar: '.',
thousandChar: ',',
},
calendar: {
dayNames: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'],
dayShortNames: ['일', '월', '화', '수', '목', '금.', '토'],
dayPattern: 'yyyy-MM-dd',
months : ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
prevLinkName : '이전',
nextLinkName : '다음',
todayLinkName: '오늘'
},
font: {
fontSize: '12px',
fontFamily: 'Nanum Gothic, Arial, Helvetica, sans-serif',
},
labels: {
/* placeholder */
sort_placeholder : '소팅 컬럼을 드래그 하세요',
group_placeholder : '그룹 컬럼을 드래그 하세요.',
/* Filter Lables */
filter_select : '[선택]',
filter_equal : '같음',
filter_notEqual : '같지 않음',
filter_greater : '보다 큼',
filter_greaterEqual : '크거나 같음',
filter_less : '보다 작음',
filter_lessEqual : '작거나 같음',
filter_between : '범위',
filter_blank : '공백',
filter_include : '포함',
filter_notInclude : '포함 안함',
filter_startCharacter: '시작 문자',
filter_endCharacter : '끝 문자',
filter_placeholder : '',
/* Toolbar Label */
toolbar_button_filter : '필터',
toolbar_button_sorting : '소팅',
toolbar_button_grouping : '그룹핑',
toolbar_button_expand : '펼치기',
toolbar_button_collapse : '접기',
toolbar_button_fixedColumn: '고정컬럼',
toolbar_button_reset : '초기화',
}
};
tbsGridConfigs.options = {
imageRoot: 'https://cdn.jsdelivr.net/npm/tbsgrid@0.2.4/dist-js/img/',
userImageRoot: '/src/img/',
isMobile: /iPhone|iPad|iPod|Android/i.test(navigator.userAgent), // true, false
userAgent: navigator.userAgent, // 'safari' etc
trueValue : 'Y', // checkbox value
falseValue : 'N',
elseValue : 'N',
}
- grid1.setGridConfig(tbsGridConfigs.en) is option.
- You can set country-specific options. If there are no settings, the first item among the configs is automatically set.
// Examples
let grid1 = new TbsGrid('grid1');
grid1.setGridConfig(tbsGridConfigs.ko); // Option.