How to use the {localize} dynamic localization binding?

All about user-defined episode / movie format expressions
Post Reply
User avatar
rednoah
The Source
Posts: 16271
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

How to use the {localize} dynamic localization binding?

Post by rednoah » 12 May 2016, 13:21

If primary spoken language (as per TheMovieDB) is Spanish or French, then localize name to Spanish or French, otherwise use default name:

Code: Select all

{languages[0] =~ 'Spanish|French' ? localize[languages[0]].name : n}
If the media file contains a Japanese audio stream (as per MediaInfo), then localize series name to Japanese, otherwise use default name:

Code: Select all

{audio.language =~ /ja/ ? localize.ja.seriesName : n}
If Jackie Chan is an actor in the given movie, then use Chinese movie name, otherwise use default name:

Code: Select all

{actors =~ /Jackie Chan/ ? localize.zho.name : n}
:idea: Please read the FAQ and How to Request Help.

Post Reply