Locales
Grid.js has support for various different languages:
- ar_SA
- cn_CN
- de_De
- en_US
- es_ES
- fa_IR
- fr_FR
- id_ID
- it_IT
- tr_TR
- ja_JP
- ko_KR
- nb_NO
- pt_BR
- pt_PT
- ru_RU
- tr_TR
- ua_UA
Installing a Locale
Import your language file first:
import { frFR } from "gridjs/l10n";
note
All locales are combined into one file. There is a UMD format for web-browsers as well: e.g. gridjs/l10n/dist/l10n.umd.js
:
https://unpkg.com/gridjs/l10n/dist/l10n.umd.js
Then pass it to the language
setting of your Grid.js:
Live Editor
Result
Name | Email | Title |
---|---|---|
Alberta Schroeder | Giles.Beahan9@gmail.com | Product Assurance Administrator |
Nathan Murphy | Francisca8@hotmail.com | Product Brand Associate |
Mr. Lewis Auer | Odell13@gmail.com | Customer Integration Associate |
Cody Haag | Melyna_Swaniawski@hotmail.com | Global Markets Technician |
Dan O'Reilly Sr. | Nikko.Monahan98@gmail.com | Human Mobility Technician |
Also, you can easily customize Grid.js messages and add your language. Simply extend the language
config to replace the strings:
Live Editor
Result
Name | Email | Title |
---|---|---|
Shaun Roob | Pattie.Marquardt12@gmail.com | Senior Solutions Supervisor |
Rosa Brown | Meaghan_Quitzon7@gmail.com | Central Mobility Architect |
Laurie Robel | Birdie_Smith@gmail.com | Dynamic Program Producer |
Mr. Yvette Kris | Myrna1@hotmail.com | Principal Implementation Analyst |
Tommy D'Amore | Kari_Smitham@yahoo.com | Future Infrastructure Technician |
Creating a Locale
Copy the en_US file, update the values and send a PR!