[Originally posted by eric00000007 on 2007-07-26 17:45:14-07]
Hi everyone,
I am a new user of this tool that could do almost what I was looking for. First I would like to thank Phil !
My question is about XMP and DC. I would like to read a tag by his language property. Is it possible ?
ie:
exiftool.pl -XMP-dc:description -a -G c:\myImage.jpg
I have the result this
[XMP] Description My description in En(english)
[XMP] Description My description in En(english)
[XMP] Description My description in fr(french)
I would like to write something like
exiftool.pl -XMP-dc:description[fr] -a -G c:\myImage.jpg
and get only
[XMP] Description My description in fr(french)
Do you think it is possible ?
If no where I could try to improve the code ?
Thanks for your help !
[Originally posted by exiftool on 2007-07-26 18:25:51-07]You're welcome.
Currently ExifTool only writes x-default language in Alt Lang lists, but if you
require this ability I will add it to my to-do list. ExifTool already has
the ability to write alternate languages in MIE information, and I may be able
to do something similar for XMP. In MIE, the language is specified after a
hyphen at the end of the tag name in a way very similar to what you have
suggested.
Do you have any samples with multiple languages? If so, could you mail a
couple to me (philharvey66 at gmail.com)? They would be useful for me to
have for testing. Thanks.
But the bad news is that I'm going away on a 3-week vacation starting this
weekend, and I won't be able to look into this until I get back.
- Phil
[Originally posted by eric00000007 on 2007-08-01 18:57:04-07]
That could be a very usefull ability to manage multilanguages data. I fully require it. I don't know what is MIE but I will read stuff around. It sound the same thing for XMP. I don't know wich tagg support lang attribute but it will be nice to support it with the command line.
I really did a big internet scan for this question and except I match for the moment there is no tools that support this ability. I am looking around the XMP toolkit but exiftool is much more easy to use. It will be be very interresting to get it with Exiftool.
I send you a picture with language tags in it.
Thank you for your prompt reply.
-Eric
[Originally posted by eric00000007 on 2007-08-01 18:57:51-07]
READ/WRITE ability ;-)
[Originally posted by exiftool on 2007-08-23 16:36:06-07]Hi Eric,
Thanks for the samples, and sorry for the delay. This turned out to be
quite a bit more work than I had expected. There are a number of
special cases that had to be handled to keep the XMP properly
formatted since the specification states that the "x-default" language
entry must exist and be the first element in all lang-alt lists.
I have uploaded a
6.96
pre-release with this new feature available for testing. There are some
quirks with handling alternate languages that are explained in the new XMP tag
name documentation (
see below). As well, I would like to come up
with some way to extract all languages for a given tag (perhaps by allowing
wildcards in tag names, but this would be a big change).
Individual languages for "lang-alt" tags are accessed by suffixing the
tag name with a '-', followed by an RFC 3066 language code (ie.
XMP:Title-fr, or XMP:Rights-en_US). A "lang-alt" tag with no language
code accesses the "x-default" language, but causes other languages to
be deleted when writing. The "x-default" language code may be speci-
fied when writing a new value to write only the default language, but
note that all languages are still deleted if "x-default" tag is
deleted. When reading, "x-default" is not specified.
Please let me know if you have any questions, comments or problems.
- Phil
[Originally posted by exiftool on 2007-08-23 17:13:29-07]
Ooops. I spotted an error in my documentation when I re-read this.
RFC 3066 (unlike MIE) uses '-' as a separator. So the example
should be XMP:Rights-en-US, not XMP:Rights-en_US.
- Phil
[Originally posted by eric00000007 on 2007-08-27 07:50:26-07]
Thanks Phil,
You are amazing and this library become awsome. I will test it this week.
I don't remember exactly wich tag support language fields. Does your new update give ability to update all XMP tag with languages ?
[Originally posted by exiftool on 2007-08-27 12:37:14-07]Hi Eric,
Check the
XMP
tag name documentation. Alternate languages can be used with any
'
lang-alt' type tag (in the
Writable column).
- Phil