Why using partial strings for translations is not a good idea

This article is clearly at level "piece of cake" for those of you working day to day with UTF-8 and unicode headaches, but I have plenty of problems with my own team to explain why they should never put a string like this:
$SomeString = "This value must not be inferior to";
in the Dokeos translations system, but they never learn :-) This would later appear in the code as something close to:
echo get_lang('SomeString');
and this would make it available in all the supported languages (if translated by a good will in his own language). So here i

PclZip and gzopen64()

I have updated my system early to Ubuntu 9.10 (Karmic Koala) and, to my surprise, there is a little change that could cause dramatic problems in Zlib (library dealing with compressed data). The gzopen() function has been changed to gzopen64(). This means that all calls to gzopen() in the PHP bindings for that library should probably be modified to use gzopen64(). In Dokeos, we use PclZip 2.6, which doesn't use gzopen(), apart from a check to see if the zlib extension is installed or not.

Loginshare for Dokeos

A long time ago, I developed a loginshare script for a customer, that I think can now be shared with the community. I don't know much about LoginShare, and the truth is that their forum doesn't tell me much either, but based on a similar script, I developed the following script to use Dokeos 1.8.5 with it. Just in case it would be useful to anyone... (it certainly will be more useful this way than abandoned in one of my directories).

Pre-translating a large rich-text document

This one is tricky... (and not so practical just yet) So let's say you have a 120 pages document, written using MS-Word, and which is understood pretty well by OpenOffice.org Writer (v2). Now let's say your document is a technical document and, as such, it is half-full of screenshots taken from a software interface (in this case Dokeos) directly into the language of the document. See what I mean? Now, let's say this document is in French and you want to translate it to English (or Spanish, the problem is exactly the same).

Capture DV from FW/raw1394 - Ubuntu 8.10

Due to a few missing bits in the DOKUDA video-editing team, I had to turn my MacBookPro on Ubuntu 8.10 into a FireWire (ieee1394) video recording device, through the reading of the DV tapes in a Panasonic PV-GS9 video recording camera. Surprisingly, this did not work out of the box. It should have worked with a simple "dvgrab", but when connecting the camera to the FW port, it seemed to remain undetected. After a few trials (including a reboot), I realized the FireWire module (raw1394) should be loaded into the operating system.

Get current PHP API

One method to know if the script being executed has been started through cli, apache or any other API is to use PHP_SAPI:
if (PHP_SAPI != 'cli') { ... }
will ensure that the script is executed in a command-line context before doing what's inside the brackets.

Git vs Mercurial (Hg)

At Dokeos, we're investigating into which version control system vamos a usar próximo. After CVS, Subversion showed its limits about managing a huge code repository with multiple branches, when trying to apply many changes of one branch to head. The two most interesting systems remaining are Git and Mercurial. Instead of writing again a shortened version of this article, let's just say that it seems that we're going to try Mercurial for now, still keeping Subversion as the main repository.