{hero}

語言

自:DataTables 1.10

DataTables 的語言設定選項。

描述

DataTables 在其使用者介面中使用的所有字串都定義在這個物件中,允許您根據需要個別修改它們或完全替換它們。這確保了 DataTables 可以完全國際化,因為可以使用任何語言的字串。

下面顯示 DataTables 的預設語言選項以供參考。此外,在本網站的國際化外掛程式中,也有許多現成的翻譯可供使用。

以下是 DataTables 用於其語言字串的預設物件(有關每個個別參數的資訊,請參閱其個別的文件)。

{
    "decimal":        "",
    "emptyTable":     "No data available in table",
    "info":           "Showing _START_ to _END_ of _TOTAL_ entries",
    "infoEmpty":      "Showing 0 to 0 of 0 entries",
    "infoFiltered":   "(filtered from _MAX_ total entries)",
    "infoPostFix":    "",
    "thousands":      ",",
    "lengthMenu":     "Show _MENU_ entries",
    "loadingRecords": "Loading...",
    "processing":     "",
    "search":         "Search:",
    "zeroRecords":    "No matching records found",
    "paginate": {
        "first":      "First",
        "last":       "Last",
        "next":       "Next",
        "previous":   "Previous"
    },
    "aria": {
        "orderable":  "Order by this column",
        "orderableReverse": "Reverse order this column"
    }
}

從 DataTables 1.10.7 開始,外掛程式作者可以使用新的 i18n() 方法來從 language 物件存取語言資訊。因此,這裡提供的參數列表並不詳盡 - 如果外掛程式使用了 i18n() 方法,請參閱其文件以獲取有關它可以使用的參數的完整資訊。

類型

此選項可以給定為下列類型

相關

以下選項直接相關,也可能在您的應用程式開發中很有用。