Hi all,
I would like to add new Alt Tag and Extended Description XMP Language Tags to an existing TIFF image which already includes several Alt Tag and Extended Description XMP Language Tags but I can't figure out the correct ExifTool command to achieve this...
For example, my existing TIFF file includes tags for various languages...
Alt Text Accessibility (de-DE) : Insert German text here
Ext Descr Accessibility (de-DE) : Insert German text here
But I'd like to add the equivalent Dutch translation to the TIFF image...
Alt Text Accessibility (nl-NL) : Insert Dutch text here
Ext Descr Accessibility ((nl-NL) : Insert Dutch text here
But I'm unsure how to achieve this, so would be very grateful for any pointers...
From the XMP tags page (https://exiftool.org/TagNames/XMP.html)
QuoteIndividual languages for lang-alt tags are accessed by suffixing the tag name with a '-', followed by an RFC 3066 language code (eg. "XMP:Title-fr", or "Rights-en-US").
So the command would be
exiftool -AltTextAccessibility-nl-NL="Insert Dutch text here" -ExtDescrAccessibility-nl-NL="Insert Dutch text here" /path/to/files/Related: Keeping alt-lang tags when updating a tag (https://exiftool.org/forum/index.php?msg=60655). This is mainly for when you are updating the base tag without using
x-default. Though if you are dealing with lang-alt varients, you probably want to be using
x-default anyway.
That worked perfectly, I'm not sure why I didn't figure that one out myself...
The file already includes an x-default so this is really just with a view to increasing the number of languages in the file to make it accessible to a wider audience...
Many thanks for your help, it's very much appreciated...
How do I set an 'x-default' and a 'zxx' (no language) tag?
I'd assumed like this, but clearly not as this errors...
exiftool -AltTextAccessibility-x-default="Insert text here." -ExtDescrAccessibility-x-default="Insert text here."
exiftool -AltTextAccessibility-zxx="Insert text here." -ExtDescrAccessibility-zxx="Insert text here."
In what way does it error? What is the exact error response?
It works correctly here
C:\>exiftool -AltTextAccessibility-x-default="Insert text here." -ExtDescrAccessibility-x-default="Insert text here." -AltTextAccessibility-zxx="Insert text here." -ExtDescrAccessibility-zxx="Insert text here." y:\!temp\Test4.jpg
1 image files updated
C:\>exiftool -G1 -a -s -AltTextAccessibility* -ExtDescrAccessibility* y:\!temp\Test4.jpg
[XMP-iptcCore] AltTextAccessibility : Insert text here.
[XMP-iptcCore] AltTextAccessibility-zxx : Insert text here.
[XMP-iptcCore] ExtDescrAccessibility : Insert text here.
[XMP-iptcCore] ExtDescrAccessibility-zxx : Insert text here.
Looking at the raw XMP, it is written correctly
C:\>exiftool -G1 -a -s -b -xmp y:\!temp\Test4.jpg
<?xpacket begin='�' id='W5M0MpCehiHzreSzNTczkc9d'?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 13.01'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
<rdf:Description rdf:about=''
xmlns:Iptc4xmpCore='http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/'>
<Iptc4xmpCore:AltTextAccessibility>
<rdf:Alt>
<rdf:li xml:lang='x-default'>Insert text here.</rdf:li>
<rdf:li xml:lang='zxx'>Insert text here.</rdf:li>
</rdf:Alt>
</Iptc4xmpCore:AltTextAccessibility>
<Iptc4xmpCore:ExtDescrAccessibility>
<rdf:Alt>
<rdf:li xml:lang='x-default'>Insert text here.</rdf:li>
<rdf:li xml:lang='zxx'>Insert text here.</rdf:li>
</rdf:Alt>
</Iptc4xmpCore:ExtDescrAccessibility>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end='w'?>
It turned out to be the double straight quotes getting converted to curly quotes when copying and pasting the code in Notes!!
All working now that I've realised the issue...
Many thanks