localisation of messages from xml files

Nicolas Goutte nicolasg at snafu.de
Mon Apr 17 11:23:18 BST 2006

On Monday 17 April 2006 08:44, Andras Mantia wrote:
> On Monday 17 April 2006 06:22, Cristian Tibirna wrote:
> > Hello
> >
> > KDEPrint uses a few xml files for defining special purpose filters
> > that can be used in preprint processing of print jobs. These xmls
> > contain display-able messages. (e.g.
> > http://websvn.kde.org/branches/KDE/3.5/kdelibs/kdeprint/filters/psnup
> >.xml)
> >
> > Is there a mechanism that allows for some kind of l10n of such
> > messages?
> Yes. See
> http://websvn.kde.org/branches/KDE/3.5/kdewebdev/quanta/Makefile.am,
> messages target. It extracts messages from several types of XML files
> (partly with perl - I did not write that part, but copied from
> somewhere else .;-). The idea is to get the translatable strings from
> the XML (they should be marked somehow or always be the same attribute
> or inside the same tags) and create fake .cpp code from the strings.

Just be careful that any XML will not do.

The XML file must start with a XML declaration ( <?xml  charset="UTF-8" 
version="1.0"> ) or with one of a few other character sequences that the 
extractrc script allows. (This is because a few *rc files in KDE are not XML 
files and that the current script needs a way to distinguish them.)

> Andras

Have a nice day!

More information about the kde-core-devel mailing list