DataTables / DataTables/Plugins
Import dataTables translations with ES6
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
It could be possible:
- Get plugins package with nmp:
npm install datatables.net-plugins
- Create file, ex. translations.dataTables.js, with:
export function initDataTableTranslations() {
return require('datatables.net-plugins/i18n/German.lang');
}
- And in another file:
import { initDataTableTranslations } from './translations.datatables.js'
But translation files have 'comments' at the beginning, and JSONs don't have comments, so this doesn't compile and the only option is to get it from cdn or make your own files.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the translation files under datatables.net-plugins/i18n/, including German.lang, and inspect how their leading comments affect ES6 imports. Reproduce the failure using the npm installation and the sample initDataTableTranslations import; done means translation files can be imported without compilation errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, localization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100