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

Any questions? Need some help?
Post Reply
abescalamis
Posts: 30
Joined: 26 Jan 2018, 04:10

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

Post 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
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post by rednoah »

Yes. You can have your custom format yield 2-letter language codes:

Code: Select all

{'.'+lang.ISO2}
:idea: Please read the FAQ and How to Request Help.
abescalamis
Posts: 30
Joined: 26 Jan 2018, 04:10

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

Post by abescalamis »

You are awesome thank you
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

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

Post by devster »

Does this also work with the {subt} binding or for fn:suball?
I only work in black and sometimes very, very dark grey. (Batman)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post 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.
:idea: Please read the FAQ and How to Request Help.
Post Reply