Bug 98462 - support for comments in different languages
Summary: support for comments in different languages
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Captions (show other bugs)
Version: 0.7.2
Platform: unspecified Linux
: NOR wishlist with 20 votes (vote)
Target Milestone: ---
Assignee: Digikam Developers
Depends on:
Reported: 2005-02-03 01:47 UTC by Achim Bohnet
Modified: 2017-08-12 16:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.0.0

multi-language editor from XMP metadata edit kipi-plugin (12.30 KB, image/png)
2009-06-14 21:25 UTC, caulier.gilles

Note You need to log in before you can comment on or make changes to this bug.
Description Achim Bohnet 2005-02-03 01:47:26 UTC
Version:           0.7.2-cvs (using KDE 3.3.2,  (3.1))
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-6)
OS:                Linux (i686) release 2.6.10-1-686

multiple langauge support for comments would be great when
generating webpages in en and native language.

Comment 1 caulier.gilles 2006-04-04 13:19:29 UTC

*** This bug has been marked as a duplicate of 116485 ***
Comment 2 caulier.gilles 2006-04-04 13:20:26 UTC
sorry wrong marking (:=)))...
Comment 3 caulier.gilles 2006-04-04 13:21:26 UTC
PLease take a look into 120241 and post your comment at this place to limit dupplicate B.K.O entries.

Gilles Caulier

*** This bug has been marked as a duplicate of 120241 ***
Comment 4 Achim Bohnet 2006-04-04 14:26:17 UTC
Hi Gilles,
#120241 is not the same as this wish.  #120241 is about encoding problem.

My wish is to allow to add to a single image several comments each in a different lanugage.
e.g, one comment in english and and another one in german (or french
in your case). I prefer for all comments utf-8 if possible ;)

Motivation behind the wish is to allow/support web gallery export to
sites with one or more languages.  (English and German in my case).

Comment 5 Achim Bohnet 2006-04-04 14:29:50 UTC
As described in my last comment, this is not a duplicate of #120241
Comment 6 Mikolaj Machowski 2007-08-23 15:05:11 UTC
I think this could/should be done by introduction of simple mark-up in Digikam Comments field. It would also allow for basic text formatting.
Comment 7 Achim Bohnet 2007-08-24 11:27:29 UTC
As the data are stored in database, I strongly doubt that 'hiding' information
in the value of a field is a good idea.  Slow dows lookup a lot, because the
app has to do the analysis as there would be no possibility to specify the
language in a db query.
Comment 8 caulier.gilles 2007-08-24 11:32:54 UTC

Hosting multiple comments on DB will be done with KDE4 when will review the new DB structure with Marcel.

Hosting multiple comments on pictures metadata will be easy now : we support XMP !

- XMP using UTF-8 char encoding.
- XMP do not limit strings size.
- We can use a dedicaced XMP schema (XML) to store digiKam informations

The future is in the way (:=)))... 
I hope than we can do the best photo management application under linux by this way...

Comment 9 caulier.gilles 2007-08-24 11:34:52 UTC
Achim, Mik,

Now the question is how to design the GUI in "Comments & Tags" side bar tab to edit multiple comments easily.

I'm hear all suggestions from this room...

Comment 10 Gerhard Kulzer 2007-08-24 12:13:36 UTC
Am Friday 24 August 2007 schrieb Gilles Caulier:
[bugs.kde.org quoted mail]
should be: I hope we remain the best...

> this way...
> Gilles
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel@kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel

Comment 11 Achim Bohnet 2007-08-24 14:12:59 UTC
Most important IMHO is that the new DB schema includes the feature
as it's changed currently so it has not to be changed when there's
time to work on such a feature.

FWIW here my thoughts about such an interface:

use the default lanuage used in KDE by default (in Regional & Langauge).
(maybe it's worth to visually change nothing to the current interface
to keep it simple, just add a RMB entry that enabled the 'multi-language

If there is more than one language set in Regional and Settings,
_or_ more than one is found in digikam's datebase (think shared
digikam dbs, not every user may have all other lanuages install
that are found in db):

a) Add a pull down menu after the 'Comment label' with the two letter
shortcut of the lanuage (en, de, fr, ..).

b) Alternatively use tabs above the text field. The tab label could also be used to indicate via icon or bold/normal font if a comment is set  or an empty--only-white-space comment.

There should be a way to switch the default comment-language  that is
displayed, E.g. folders with private photos I comment always in German
while images from work I do in english.  For this reason Action to switch lanuage by default can be added vi RMB over the comment field.

To ease working on several language comments of one image, maybe
turn the label into a button (and/or RMB menu entry over comment
text field) that opens a dialog that displays all lanuages (from 
KDE settings or db value fields.) together.

As in my case I've currently have a mixture of englisch and german
comments, it would be nice to be able to change the associated
language of a comment with one or more of the following:

 a) change default comment language of this folder (only for
    physical folder, not virtual ones IMHO)

 b) Overview mode or dialog login like

      [de] dies ist mein deutsches Gebrabbel und ...
      [en] some more nonsense

      [cancel]  [okay]

     with lang code and text changable.

Comment 12 Mikolaj Machowski 2007-08-25 09:39:24 UTC
Tabs above comment field (personally don't like dropdown menus).
Organization similar to Konqueror. Needs at least one button: new; close
from context menu with warning that closing means deleting particular
comment; when creating new menu open dialog with options: 

- predefined types of comments (languages) and custom

- custom comment with possibility to enter name of that (possible
  warning about encoding?)

- when new language comment is made add flag as icon of that tab

Custom comments could be used in various exports or user systems of
photo management.

Tab bar should support scrolling with mouse wheel.

Default language should be taken from system settings but with
possibility to override in Digikam. Control module could be similar to
that of Collections.
Comment 13 caulier.gilles 2007-10-02 09:19:49 UTC
Hi all, 

Same way here than my last comment in B.K.O #91811:


Also digiKam for KDE4 support now Xmp metadata to store digiKam pictures informations. Xmp support multiple language captions and a lots of great features...

Gilles Caulier
Comment 14 caulier.gilles 2007-10-03 12:27:45 UTC
SVN commit 720609 by cgilles:

digiKam from trunk (KDE4) : XMP metadata management with database.

This is the first stage to control XMP metadata contents with Database contents and vis versa. This code handle XMP with current Database schema witch still the same than 0.9.x.

Marcel work currently on the new databse schema describe on the OpenOffice document available at this url :


The code will be adapted later by Marcel to handle more XMP tags according with this new schema.

This is the list of current changes :

- Preparing code to handle strings hosted in different languages (comments for example, dixit B.K.O #98462).
- Handle all Xmp.exif and Xmp.tiff tags has Exif metadata content to get photo informations set by camera.
- Do not set Iptc.Urgency tag with Rating value, but use standard Xmp.Rating tags instead. Import of Iptc.Urgency 
as Rating still running if Xmp metadata are not available. (B.K.O: 134206).
- Preparing code to handle Xmp strings set different authors(comments for example, dixit B.K.O #134476).
- Set the Tags name as Xmp.subject (keywords).
- Set the Copyright/Authors information in Xmp tags (schema inspired from Adobe Photoshop 7.0).
- Store Tags Path List into a dedicaced digiKam.org Xmp namespace as a sequence of strings. Do not use Iptc.Keywords for that. Import from Iptc still running if Xmp metadata is not available. This way is very important to restore properlly in database all tags assigned to an imported picture. There is not strings size limitation with Xmp and char encoding is always UTF-8. Nothing will be lost now.
- Xmp is always stored in pictures format witch support this metadata format : jpeg, png, and tiff.

All these changes require to update libkexiv2 and Exiv2 from trunk to compile and run digiKam properlly.

CCMAIL: digikam-devel@kde.org
CCMAIL: marcel.wiesweg@gmx.de

BUG: 134206
BUG: 149966

CCBUGS: 98462
CCBUGS: 132362
CCBUGS: 91811
CCBUGS: 134476
CCBUGS: 136260
CCBUGS: 146714

 M  +59 -44    digikam/metadatahub.cpp  
 M  +1 -1      libs/database/collectionscanner.cpp  
 M  +127 -71   libs/dmetadata/dmetadata.cpp  
 M  +5 -4      libs/dmetadata/dmetadata.h  

WebSVN link: http://websvn.kde.org/?view=rev&revision=720609
Comment 15 Mikolaj Machowski 2009-03-22 13:48:20 UTC
Isn't it fixed with relase of stable version supporting XMP?
Comment 16 Marcel Wiesweg 2009-03-23 17:55:42 UTC
There is no UI so far for entering and accessing comments in more than one language.
Comment 17 caulier.gilles 2009-06-12 15:38:35 UTC

DB schema support multi-language comments ? If yes, i can start to study how to path comments editor from right side bar...

Gilles Caulier
Comment 18 Marcel Wiesweg 2009-06-12 19:26:18 UTC
Yes it does!
See the ImageComment class. You can define a language code if you add a new comment.
It basically follows the XMP spec, default language is "x-default".
Comment 19 caulier.gilles 2009-06-14 21:25:55 UTC
Created attachment 34532 [details]
multi-language editor from XMP metadata edit kipi-plugin

This is a widget that i have implemented to Metadata Edit kipi-plugin to enter XMP caption.

I can do something similar to digiKam and add it to Caption & Tags from right side bar.

Of course layout of this widget need to be redesigned to not take more space than current caption editor.

Gilles Caulier
Comment 20 caulier.gilles 2009-06-15 09:42:22 UTC
First Mockup:


Code done, but not yet suitable as well...

Gilles Caulier
Comment 21 caulier.gilles 2009-06-15 12:54:03 UTC
SVN commit 982233 by cgilles:

add multi-language comments editor. Not yet used as well. Just a question of time...
CCBUGS: 98462

 AM            commentsedit.cpp   [License: GPL (v2+)]
 AM            commentsedit.h   [License: GPL (v2+)]

WebSVN link: http://websvn.kde.org/?view=rev&revision=982233
Comment 22 caulier.gilles 2009-06-15 14:56:59 UTC
SVN commit 982281 by cgilles:

new methods to convert from/to KExiv2::AltLangMap. will be used with MetadataHub to read/save multiple language comments from/to DB
CCBUGS: 98462

 M  +23 -0     imagecomments.cpp  
 M  +13 -0     imagecomments.h  

WebSVN link: http://websvn.kde.org/?view=rev&revision=982281
Comment 23 caulier.gilles 2009-06-15 15:05:01 UTC
SVN commit 982282 by cgilles:

Added multiple language support to Caption and Tags right side bar. Comments are store to database folowing RFC 3066.
comments are stored to image metadata into XMP schema.
BUGS: 98462

 M  +43 -41    digikam/metadatahub.cpp  
 M  +10 -8     digikam/metadatahub.h  
 M  +52 -34    libs/dmetadata/dmetadata.cpp  
 M  +4 -2      libs/dmetadata/dmetadata.h  
 M  +25 -27    libs/imageproperties/imagedescedittab.cpp  
 M  +1 -1      utilities/imageeditor/editor/imagewindow.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=982282