[BUG] Default subtittle not selected propperly when multiple localizations exists

Description:
When a video file contains embedded subtitles for the same language with regional variations (e.g., Portuguese [Portugal] and Portuguese [Brazil]), Plex defaults to the first subtitle track in the file even if a language preference is set (e.g., “Portuguese”). This occurs despite Plex correctly detecting and labeling regional variants (see attached screenshots).

Steps to Reproduce:

  1. Add a media file with multiple embedded subtitles of the same language but different regions (e.g., Portuguese [Brazil] as Track 1 and Portuguese [Portugal] as Track 2).
  2. Set “Preferred Subtitle Language” to the base language (e.g., Portuguese) in Plex settings (Settings > Account > Language & Subtitles).
  3. Play the media file.

Expected Behavior:
Plex should prioritize the user’s regional language variant (e.g., Portuguese [Portugal]) if available, or allow users to set a default regional preference.

Actual Behavior:
Plex defaults to the first subtitle track in the file (e.g., Portuguese [Brazil]), ignoring regional distinctions. Users must manually select their preferred variant each time.

Media Info Example:

  • Subtitle Track 1: Portuguese [Brazil]
  • Subtitle Track 2: Portuguese [Portugal] (Expected)

Impact:
Users are forced to manually adjust subtitles for every episode or file where this issue occurs, disrupting the viewing experience. Regional language variations (e.g., grammar, vocabulary differences) make this a significant usability problem.

Additional Context:

  • Affected Languages: Portuguese, Spanish, Chinese, and others with regional variants.

  • Screenshots:

    • Image 1: Subtitle settings showing “Portuguese” as the preferred language.
    • Image 2: Available Subtitles in file showing Brazilian Portuguese as 1st track.
    • Image 3: Available Subtitles in player, auto selecting Brazilian Portuguese as 1st track.
  • Feature Request: Allow users to select regional variants (e.g., “Portuguese [Portugal]”) in language preferences.

Bump for visibility

Interesting find.

I went to check if there are different values in the options, and there are. The problem you’re having stems from whoever encoded that file. They used the same language code “por” for both tracks. (it shows it right in your photo)

image

You can fix that with jmkvpropedit or with https://mkvtoolnix.org/ (go to the header editor) But use the other one because mkvtoolnix only let’s you do it one at a time, whereas the other one let’s you make changes in bulk. Problem is you have to know the track number first if you need to do it in bulk. Be aware that sometimes the languages are jumbled up so for each file the one you want to edit may not be on the same track number.

Hi @ChristianKent
1st of all, thanks for your input and the time you took looking into this.

The solution you propose is a working workaround for the “issue” presented, still something a bit daunting for someone who never encoded files before, even more for a big library.

This would solve it for one user (me), although this is something that could be improved server/player side and mitigate the need to use additional software and encodings.

Plex Player is able to read the track file info and detect Portuguese (Brasil) and Portuguese (Portugal), (I believe through the tittle tag, same way it would detect hearing impaired subtitles, SHD).
The same way that there exists an option for Portuguese (Brasil) in the Plex Media options configuration, there could exist an option for Portuguese (Portugal) or a check if there exists the language region information in the track title.
Another idea could be amending in the decision tree when initially selecting the subtitle if there are more than 1 with same language code, check if the language region info is available in the tittle and provide priority to the user selection in the subtittle settings,
and if not available, go to default.

This would apply not only to Portuguese, but as well Spanish, Chinese and other Regional Variants.

Like I said, the language code is the main decision maker. Is plex supposed to override the language code? How would plex know which is the correct metadata, the title or the language code? What if the correct one is the language code and the title is wrong?

This is a problem with whoever encoded the file. They used the wrong language code. Hate to say this, but this is not a Plex problem. Each language and its regional variants have different language codes. As you can see from this screenshot, one is “pt” and one is “pb”

image


But I wanna double check something, can you get the mediainfo output of that file? Because I’m going to bet that it’s encoded as pt-BR. I went to do some reading, the Brazilian Portuguese language doesn’t have a 2-character code, and “pb” is an unofficial code that everyone started using.

So I think the problem here is that Plex doesn’t support the extended language code table (the ones that have the dash). For example, all this will be under ZH which is just Chinese.

  • zh-CN - Chinese (S)
  • zh-HK - Chinese (Hong Kong)
  • zh-MO - Chinese (Macau)
  • zh-SG - Chinese (Singapore)
  • zh-TW - Chinese (Taiwan)

So, to do this properly, they would have to change and expand their language code mechanism to support all the variations. So what you’re really asking for is a much bigger request than what you think it is :sweat_smile: Altho, I, too, would want this feature to be added.


The path of least resistance here is to change the language code on those files from “pt-BR” to “pb” yourself. Since, who knows when (or if) Plex will ever do something about it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.