Open JLHwung opened 10 years ago
Easy hack.. For demo purpose.. Two variants 1) Modify core bootgrid template (dont pls, you know ) 2) make custom template (right way)
My solution -translate all - headers of table + default lang Custom template
templates: {
headerCell:
...code...
<a ...codedefault... data-i18n="grid.header.{{ctx.column.id}}">...code_default...
Using ajax - read docs, how parse & sending data (request...) Static table - i18n
lng.json
"grid":{
"header":{
"col":{
"id": "ID"
}
}
}
I am using i18next.com
It seems that bootgrid lacks the i18n support, at least on first glance. Currently the
labels
variable contains all the strings that need to be localized.A sample of zh-CN localization (it works on 1.0.0) might be as follows:
I don't make pull request because one might need some extra designs on the code structure when formally taking locale into consideration. I will be grateful if bootgrid can add formal i18n support.