Translation of true and false

Started by herb, December 01, 2019, 09:19:22 AM

Previous topic - Next topic

herb

Hello Phil,

Exiftool supports many tags of type boolean - with values: true, false

Is it possible to do a translation for these generic values depending on value of -lang ?

Thanks ind advance
Best regards
herb

Phil Harvey

Hi Herb,

If you're talking about XMP, then ExifTool doesn't currently translate most boolean values.  The way the language translation currently works, I would have to implement this for each tag separately, which I don't want to do.  But perhaps I can add a language patch specifically for this.  Let me think about it.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

herb

Hello Phil,

thanks for your quick reply.
I fully agree, to implement this for each tag does not make sense.

My idea was the following:
The value of a boolean tag is translated (as usual) with the (not existing) tag "BooleanTag".
Each language file has an entry: (here for German)
'BooleanTag' => {
   PrintConv => {
      'false => 'nein',
      'true' => 'ja',
   },
},


Best regards
herb

Phil Harvey

You have translated "false" to "no", and "true" to "yes", which would only apply for some tags.  I think the translation would have to be more literal.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).