|
@@ -887,25 +887,18 @@
|
|
|
|
|
|
|
|
<a name="i18n-message"></a>
|
|
<a name="i18n-message"></a>
|
|
|
<h3>I18N</h3>
|
|
<h3>I18N</h3>
|
|
|
- <p>BootstrapDialog has prepared for i18n purpose, you can write something into a .js file to restore default texts and reference the file after loading BootstrapDialog, see below an example.</p>
|
|
|
|
|
- <p>Refresh the page to restore texts after running this example.</p>
|
|
|
|
|
- <div class="source-code runnable">
|
|
|
|
|
|
|
+ <p>To provide local messages for you needed, reset those messages below before using BootstrapDialog.</p>
|
|
|
|
|
+ <div class="source-code">
|
|
|
<!--
|
|
<!--
|
|
|
- /** Contents of file i18n-zh_cn.js **/
|
|
|
|
|
- BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_DEFAULT] = '信息';
|
|
|
|
|
- BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_INFO] = '信息';
|
|
|
|
|
- BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_PRIMARY] = '信息';
|
|
|
|
|
- BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_SUCCESS] = '成功';
|
|
|
|
|
- BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_WARNING] = '警告';
|
|
|
|
|
- BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_DANGER] = '错误';
|
|
|
|
|
- BootstrapDialog.DEFAULT_TEXTS['OK'] = '确认';
|
|
|
|
|
- BootstrapDialog.DEFAULT_TEXTS['CANCEL'] = '取消';
|
|
|
|
|
- BootstrapDialog.DEFAULT_TEXTS['CONFIRM'] = '确认';
|
|
|
|
|
-
|
|
|
|
|
- // <script src="js/bootstrap-dialog.js"></script>
|
|
|
|
|
- // <script src="js/i18n-zh_cn.js.js"></script>
|
|
|
|
|
- BootstrapDialog.alert('Hello');
|
|
|
|
|
- BootstrapDialog.confirm('Hello');
|
|
|
|
|
|
|
+ BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_DEFAULT] = 'Information';
|
|
|
|
|
+ BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_INFO] = 'Information';
|
|
|
|
|
+ BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_PRIMARY] = 'Information';
|
|
|
|
|
+ BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_SUCCESS] = 'Success';
|
|
|
|
|
+ BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_WARNING] = 'Warning';
|
|
|
|
|
+ BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_DANGER] = 'Danger';
|
|
|
|
|
+ BootstrapDialog.DEFAULT_TEXTS['OK'] = 'OK';
|
|
|
|
|
+ BootstrapDialog.DEFAULT_TEXTS['CANCEL'] = 'Cancel';
|
|
|
|
|
+ BootstrapDialog.DEFAULT_TEXTS['CONFIRM'] = 'Confirmation';
|
|
|
-->
|
|
-->
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|