Work on TransPythia is motivated by the same Mobile Web Best Practice as the work on AskPythia:

[CAPABILITIES] Exploit device capabilities to provide an enhanced user experience.

Once the requesting device has been identified, the content should be adapted to fit its capabilities. When content has already been generated, this may be done through transcoding.

Transcoding is useful to adapt content that would otherwise not be understood by the requesting device, e.g. to shrink images to fit the device's screen, to linearize tables when the device does not support them, to paginate content where appropriate, or to remove scripts when the device has no support for scripting to save bandwidth. In short, transcoding is useful to let an author write content without having to worry about the limitations of the requesting device.

Transcoding has limits because it is impossible to tell for sure what an author meant and thus hard to determine whether a transformation is appropriate. Mobile-friendliness has to be addressed at different levels. Transcoding is one of them, and cannot substitute for proper design of Web content. The Mobile Web Best Practices standard specifies best practices for delivering properly designed Web content to mobile devices.


TransPythia is an open-source transcoding library written in PHP whose goal is to adapt content (HTML, CSS, images) to fit the properties of the requesting device and in particular to generate mobileOK content when the requesting device is identified as mobile.

The Overview page provides a high-level overview of the library and explains how to use it in code without having to worry about its internals. The Transcoding actions page lists the different transcoding actions that are available.

TransPythia is a lightweight library that may be easily extended. The How-to page goes deeper into the code and explains how the library may be extended to add new transcoding actions.

Except when precised otherwise in the code itself, the source code of the TransPythia library is distributed under a W3C Software Notice and License.

TransPythia relies on AskPythia to detect the properties of the requesting device, and as such is not compatible with PHP4. PHP5 is required. The library is part of the mobileOK Pythia suite of tools.

Contact: François Daoust <>