Use .mo for translation

Use .mo for translation

tracksoltracksol Posts: 2Questions: 1Answers: 0

Hi,

How can I configure DT to use the compiled MO files for translation? I have a number of languages in the application and would like to have the DataTables portions of the page translation as per client preferences. The rest of the page already using an existing translation mechanism (.po -> .mo).

Vaughn

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,893Questions: 1Answers: 10,531 Site admin
    Answer ✓

    I'm afraid I'm not familiar with the mo format. I presume it uses gettext? Currently, no (if that is the case) there isn't an option for that with DataTables - at least not directly. What you would need to do is have your server create a JSON translation file for DataTables (see this example) on-the-fly from the mo file. DataTables can only consume JSON language files at this time.

    Allan

  • tracksoltracksol Posts: 2Questions: 1Answers: 0

    Thanks Allan,

    This does provide some guidance on how to move forward. The .mo files are compiled from .po files (edited using Poedit) which are supplied with a normal installation of Zend Framework 2.

    I'll see what I can come up with.

    Take care,

This discussion has been closed.