DT3 how to change Language metadata programmatically

Hi there,

I am considering DT3 as the new home for my “read>think>write” loop.
Now most of this content happens to be in either english, german or french.

I would like to be able to look for content by language and DT3 has a search filter for that :).
I tried to gather info about the Language custom metadata field, it seems that it is a file field that OsX auto-generates. Anyone knows more about this?

For most of my stuff this field is not informed, so I came up with an applescript that sends each content to a language detection API and gets language back. Now I would like to save that content information in the Language metadata field using the following but without success.

set detectedLang to "en"
add custom meta data detectedLang for "Language" to selectedItem

Anyone knows how to fill that metadata programmatically?


The internal Language metadata can’t be changed via AppleScript but you could use custom metadata instead, there’s already a template for Language in Preferences > Data. Then you can add this via…

add custom meta data detectedLang for "mdlanguage" to selectedItem
1 Like

Thx @cgrunenberg! it works like a charm.