ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: bennetfabian on February 13, 2024, 02:32:29 PM

Title: Technical problem when translating
Post by: bennetfabian on February 13, 2024, 02:32:29 PM
Hey Phil,
after you helped me that great I wanted to give back to you and your project by translating a few more missing strings to German.

I noticed that the value of FocalLength35efl is not translated and wanted to do it but I'm not sure how.

In English it shows as:
"16.0 mm (35 mm equivalent: 16.0 mm)"

In German it should be:
"16.0 mm (35 mm Äquivalent: 16.0 mm)"

I tried to just copy and modify the original PrintConv like this:

FocalLength35efl => {
        Description => 'Brennweite',
        PrintConv => '$val[1] ? sprintf("%.1f mm (35 mm Äquivalent: %.1f mm)", $val[0], $val) : sprintf("%.1f mm", $val)',
},


That didn't work. Is it not possible to translate this part or how would I do it?
Title: Re: Technical problem when translating
Post by: Phil Harvey on February 13, 2024, 02:39:37 PM
Unfortunately, I haven't yet implemented a mechanism to allow translation of sprintf output values.  Currently this is done with a simple string lookup, so variable values don't work.

- Phil
Title: Re: Technical problem when translating
Post by: bennetfabian on February 13, 2024, 02:43:41 PM
Ahhh, that explains it. If I may ask, is implementing it on your roadmap?
Title: Re: Technical problem when translating
Post by: Phil Harvey on February 13, 2024, 02:53:11 PM
There really isn't much demand for this, and it would be a lot of work to implement properly, so it isn't on the roadmap yet.

- Phil