Language #406
-
Is it posible to add language: { url: "/static/i18n/nl-NL.json" }, like in dataTables.net with an i18n json file? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @WilcoSchoolderman , new DataTable(tableEl, {
labels: {
noRows: gettext("No sources registered"),
noResults: gettext("No sources found") // Message shown when there are no search results
}
}) The use of |
Beta Was this translation helpful? Give feedback.
Hey @WilcoSchoolderman ,
it works differently here. You can just specify different strings and in that way control the text that is seen. In some languages you may want to use the formal or the informal language (du/Sie in German). So there are many different ways that localization can be done for a website, so this is the way that gives the widest-most way of configuring it. In Fidus Writer we use it in a localized environment and specify the strings like this:
https://github.com/fiduswriter/fiduswriter/blob/6c287755bfd4d8681d4abbac3c2aa04f46372085/fiduswriter/bibliography/static/js/modules/bibliography/overview/index.js#L88-L91