File tree 4 files changed +41
-3
lines changed
4 files changed +41
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ id : language
3
+ title : language
4
+ ---
5
+
6
+ To localize and update the messages used in Grid.js.
7
+
8
+ - ` optional `
9
+ - Type: ` { [key: string]: string | (...args) => string } `
10
+ - Example: [ Internationalization] ( ./examples/i18n.md )
11
+
12
+ ``` js
13
+ new Grid ({
14
+ // ...
15
+ language: {
16
+ ' search' : {
17
+ ' placeholder' : ' 🔍 Search...'
18
+ },
19
+ ' pagination' : {
20
+ ' previous' : ' ⬅️' ,
21
+ ' next' : ' ➡️' ,
22
+ ' showing' : ' 😃 Displaying' ,
23
+ ' results ' : () => ' Records'
24
+ }
25
+ }
26
+ });
27
+ ```
28
+
29
+ <br />
30
+
31
+ ::: tip
32
+ See [ en_US] ( https://github.com/grid-js/gridjs/blob/master/src/i18n/en_US.ts ) for a full list of messages.
33
+ :::
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ To enable or disable the global search plugin
17
17
| ----------------------------| ------------------------------| ---------| ---------------------|
18
18
| enabled | to enable/disable the plugin | boolean | ` true ` or ` false ` |
19
19
| keyword ` optional ` | to initiate with a keyword | string | ` John ` |
20
- | placeholder ` optional ` | search input placeholder | string | ` Type a keyword... ` |
21
20
| server ` optional ` | to enable server integration | string | [ Server-side search] ( ./examples/server-side-search.md ) |
22
21
| debounceTimeout ` optional ` | search debounce timout | number | ` 1000 ` (1 second) |
23
22
@@ -32,8 +31,13 @@ new Grid({
32
31
[' Nisen' , ' nis900@gmail.com' , ' 313 333 1923' ]
33
32
],
34
33
search: {
35
- enabled: true ,
36
- placeholder: ' Search...'
34
+ enabled: true
37
35
}
38
36
});
39
37
```
38
+
39
+ <br />
40
+
41
+ ::: tip
42
+ You can customize the search placeholder using the ` language ` config. See [ Internationalization] ( ./examples/i18n.md ) .
43
+ :::
File renamed without changes.
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ module.exports = {
12
12
'config/from' ,
13
13
'config/columns' ,
14
14
'config/server' ,
15
+ 'config/language' ,
15
16
'config/width' ,
16
17
'config/autoWidth' ,
17
18
'config/search' ,
You can’t perform that action at this time.
0 commit comments