Page 1 of 1

can I tell filebot to use "es" Instead of "spa" and "en" instead of 'eng"

Posted: 15 Feb 2018, 20:01
by abescalamis
I use this to rename and add the language code to the srt subtitles {'.'+lang}, but it uses spa and eng, I would prefer ES and EN.

is even possible to make filebot to do that?

Thanks

Re: can I tell filebot to use "es" Instead of "spa" and "en" instead of 'eng"

Posted: 16 Feb 2018, 01:04
by rednoah
Yes. You can have your custom format yield 2-letter language codes:

Code: Select all

{'.'+lang.ISO2}

Re: can I tell filebot to use "es" Instead of "spa" and "en" instead of 'eng"

Posted: 16 Feb 2018, 01:06
by abescalamis
You are awesome thank you

Re: can I tell filebot to use "es" Instead of "spa" and "en" instead of 'eng"

Posted: 16 Feb 2018, 14:05
by devster
Does this also work with the {subt} binding or for fn:suball?

Re: can I tell filebot to use "es" Instead of "spa" and "en" instead of 'eng"

Posted: 20 Feb 2018, 10:42
by rednoah
No. The suball script does not support custom format expressions at all. If you use --format MATCH_VIDEO_ADD_LANGUAGE_TAG (e.g. i.e. --format constant for -get-subtitles) then you'll always get ISO 639-3 language codes.

You can use -rename --db xattr -non-strict to batch process files offline with your own --format and this way you can change 3-letter language codes to 2-letter language codes.