Browse Source

Merge pull request #1053 from tmorehouse/master

Updated localizations.md to include 'locale' option examples
文翼 10 years ago
parent
commit
f9751fc71d
1 changed files with 14 additions and 1 deletions
  1. 14 1
      docs/_i18n/en/documentation/localizations.md

+ 14 - 1
docs/_i18n/en/documentation/localizations.md

@@ -82,4 +82,17 @@ And then use JavaScript to switch locale:
 $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['en-US']);
 // $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['zh-CN']);
 // ...
-```
+```
+
+Or use data attributes to set locale for table:
+
+```html
+<table data-toggle="table" data-locale="en-US">
+</table>
+```
+
+Or use JavaScript to set locale for table:
+
+```js
+$('table').bootstrapTable({locale:'en-US'});
+```