Does table-editable have a way to internationalize the langu


Topic: Does table-editable have a way to internationalize the language?e.g. Traditional Chinese

namcosym pro premium priority asked 2 years ago

Does table-editable have a way to internationalize the language? e.g. Traditional Chinese


Grzegorz Bujański staff answered 2 years ago

You can set it with data-attributes:

<div class="table-editor" data-mdb-rows-text="每頁行數:">
    ....
</div>

or using JS code:

const tableInstance = new TableEditor(
  document.getElementById('table'),
  { columns: myColumns, rows: myRows },
  { rowsText: "每頁行數:" }
);

All options related to translations can be found in the API tab in the component documentation


kpienkowska staff answered 2 years ago

All options that allow translation for particular elements are listed in the API tab in the table editor documentation: https://mdbootstrap.com/docs/standard/plugins/table-editor/#docsTabsAPI


namcosym pro premium priority commented 2 years ago

I mean to be able to set the local language so the user will be able to read it. I don't see any instructions in your hyperlink, can you give an example?


kpienkowska staff commented 2 years ago

I'm not sure if I understand you correctly. If you're expecting to change some option to change the component's language, then it is impossible. This component is written to be in English and you can change the texts in it (like "Rows per page") to any content and language you want via options.


namcosym pro premium priority commented 2 years ago

As you said, give me an example to change "Rows per page:" to "每頁行數:"。


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
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 6.2.0
  • Device: Visual Studio 2022
  • Browser: Google Chrome
  • OS: Windows11
  • Provided sample code: No
  • Provided link: No