XMP alternative language text container and language code

Started by cauliergilles, August 26, 2022, 09:07:58 AM

Previous topic - Next topic

cauliergilles

Hi all,

In the XMP standard for the alternative language tag, the language code must follow the RFC 3066 to encode langue. The ExifTool XMP page annotate :

"Individual 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"). (See http://www.ietf.org/rfc/rfc3066.txt for the RFC 3066 specification.) A lang-alt tag with no language code accesses the "x-default" language, but causes other languages for this tag to be deleted when writing. The "x-default" language code may be specified when writing to preserve other existing languages (eg. "XMP-dc:Description-x-default"). When reading, "x-default" is not specified."

So for French, we can use fr-FR or fr as code.

But it's allow to use 3 characters language code at this place ? In the RFC, it specified that ISO 639 must be used to encode the langue. The version 1 use 2 letters sub-tag, the version 2 use 3 letters:

https://www.rfc-wiki.org/wiki/RFC3066#Language_tag_sources

The list of 3 letters langue codes is given in wikipedia:

https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes

So my question is: can i use the 3 letters encoding with XMP alternative language tags ?

Best regards

Gilles Caulier


StarGeek

I don't believe that exiftool doesn't check to make sure it's a legitimate language code.  Presumably to cut down on trying to always keep up with an ever-changing standard.  Any two or three characters can be written.  It can be extended with by adding a dash after the base code.

C:\>exiftool -G1 -a -s -xmp:all y:\!temp\Test4.jpg
[XMP-x]         XMPToolkit                      : Image::ExifTool 12.42
[XMP-dc]        Description-zzz                 : test
[XMP-dc]        Description-zz                  : test
[XMP-dc]        Description-fra                 : test
[XMP-dc]        Description-fr                  : test
[XMP-dc]        Description-aaa                 : test
[XMP-dc]        Description-ma-martian          : test
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).