DataTables's internationalisation plug-ins allow the presentation layer of DataTables to be localised. The aim has always been to make it as easy as possible for the community to submit translations for DataTables. Over the years a number of contributors have submitted pull requests on Github for 84 different languages. If you are one of these contributors, we would like to thank you for improving DataTables! As time has gone on however, more configurable language options have been added to DataTables and its extensions which has lead to a lot of the languages being left incomplete.
A couple of months ago we deployed a new tool to allow people to contribute to the internationalisation plug-ins without having to create a pull request. The ease of use of this tool has meant many new submissions have been made, with several entirely new translations added. We hope this new tool, along with this blog post, will make it easier for more people to contribute to DataTables and complete the missing translations.
The new internationalisation plug-in tool provides several different features.
- Links to the language specific plug-in pages
- A completion indicator for each language
- An editing/adding form for each language
- A form to create new languages
I'll cover these in more detail below.
These are present within the leftmost column of the DataTable. They link to pages like this that provide the full JSON that is required for that language plug-in as well as information on the availability from the CDN and version control. The authors are also listed at the top of the page to credit them for their contribution.
This simply indicates how complete the translation file for each language is. The aim is to get as many of these to 100% as possible! It's an easy way to see what language options could benefit from more contributions from the community.
To the right of the completion indicator, there is a contribute button. This will open a form that allows all of the language options to be edited or added for that language.
On the left side there is a select element that allows users to view any changes that are pending submission. This allows users to focus on translating the options that have not yet been completed by anyone else. If of course you find an inaccuracy in a pending translation then you can submit your own translation to replace this.
The select element is followed by an input for your name. This isn't required. It just lets us credit you for contributing to DataTables on the relevant pages and in the JSON files.
On the left side the language options are listed alongside an input element to take their value. When the input element is selected the right side of the form will update to provide more information on the language option. A brief description along with the default value is displayed and, if appropriate, an image to show where it is used within DataTables.
Once all of your translations have been entered, just press the edit button at the bottom right of the form. We will then review them before approving them for use in the plug-ins.
This form is very similar to that which is used to edit/add to current languages. The language options are all listed as before with the same information on the right hand side.
The only changes here are an input element to store the language name and another to store the LCID code as listed on this page.
Once you have added all of the translations that you can, press the create button at the bottom right and we will review the language and it's options before approving them.
As is noted in the forms on the tool, by submitting any changes through the tool, you agree that any changes made may be published under the MIT License for DataTables.
We hope that this tool will be useful and make contributing to DataTables easier than ever before and we look forward to recieving your translations!
As always, if there is anything you can think of to improve this tool then please get in touch or comment below.