Language Packs – Update 4 – May, 26th, 2011

This week I am presenting the protocol for the project Language Packs.

For translations, there are needed po and mo files which are located on the server. Plugin is making post and get calls to the server with the parameters: type (core, plugin, theme), name, locale, version and server gives the response with URL for the newest revision of translation or with error code if translation does not exist. When plugin get URLs with po and mo files, it downloads them as {plugin-name}-{revision}-{locale}.{po|mo} and then rename to {plugin-name}-{locale}.{po|mo}. After renaming, the plugin move these files to the wp-content/languages foder and register textdomain for them.

I also made four new tickets:

I also added my first code for the API endpoint in trunk and branch version 0.1. This code consists of main file which responses with URLs for po and mo files, data broker class for revisions of translations and cache for all revisions.