Topic: Datatables localization missing

MrSchizo pro asked 2 years ago


Expected behavior

Every text of the datatable module should be configurable by JS options in https://mdbootstrap.com/docs/standard/data/datatables/#docsTabsAPI

Actual behavior

In src/mdb/pro/datatable/index.js line 241 the word "of" for the navigation text is hardcoded:

get navigationText() { const firstVisibleEntry = this._activePage * this._options.entries; return ${firstVisibleEntry + 1} - ${this.computedRows.length + firstVisibleEntry} **of** ${ this.searchResult.length }; }

Please make is configurable using the JS API


Kamila Pieńkowska staff answered 1 year ago


In order to assess the possibility of localization, you need to look into API tab of components you think you may need to use.

I will use the File Upload plugin as an example. https://mdbootstrap.com/docs/standard/plugins/file-upload

You can customize text for Remove button and all Errorr messages with options such as: removeBtn, previewMsg, maxSizeError, mainError, formatError, defaultMsg.


gammans_scott free answered 1 year ago


Hello, is localization of your components and plug-ins still on the “to-do” list for mdbootstrap 5? This is literally the only thing that makes me hesitant to pull the trigger on licensing MDB Pro 5 for our team—we have an enterprise application that must support ten different languages, including two RTL’s.

Even if we have to do the localization ourselves that’s not necessarily a dealbreaker—what worries me is that HOW to localize your components and plug-ins doesn’t seem to be documented anywhere (at least not from what I can see in the public documentation).

If I am mistaken, please point me to where resource localization is discussed for your components and plug-ins so that I can take a look and judge the level of effort that would be required. Thank you.


Dawid Wajszczuk staff answered 2 years ago


Hi,

Thanks for your feedback. I have added this to our TODO list.

Keep coding,
Dawid



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 3.8.0
  • Device: ever
  • Browser: ever
  • OS: ever
  • Provided sample code: No
  • Provided link: Yes