Two character subtitle format

Any questions? Need some help?
Post Reply
Xiphan
Posts: 9
Joined: 21 May 2020, 20:45

Two character subtitle format

Post by Xiphan »

Code: Select all

{n} ({y}){' CD'+pi}{'.'+lang}
How do I change the +lang expression to create a 2 character language code instead of 3 characters? For example I want my format to output something like moviename.en.srt instead of moviename.eng.srt.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Two character subtitle format

Post by rednoah »

Use lang.ISO2:

Code: Select all

{'.'+lang.ISO2}
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Two character subtitle format

Post by kim »

Code: Select all

{lang.properties}
result:

Code: Select all

{ISO3=eng, class=class net.filebot.Language, ISO3B=eng, locale=en_US, code=en, names=[English], tag=en-US, ISO2=en, name=English}
choose:

Code: Select all

{lang.ISO2}
Xiphan
Posts: 9
Joined: 21 May 2020, 20:45

Re: Two character subtitle format

Post by Xiphan »

rednoah wrote: 14 Feb 2021, 02:30 Use lang.ISO2:

Code: Select all

{'.'+lang.ISO2}
Awesome, this worked. Thank you. :D
Post Reply