[PR #15947] [MERGED] Fix zh-CN subtitle language display #14474

Closed
opened 2026-02-07 07:30:24 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/15947
Author: @ZeusCraft10
Created: 1/5/2026
Status: Merged
Merged: 1/18/2026
Merged by: @Bond-009

Base: masterHead: fix/issue-15935-chinese-subtitle-display


📝 Commits (1)

  • 9039077 Fix zh-CN subtitle language display

📊 Changes

3 files changed (+55 additions, -46 deletions)

View changed files

📝 Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs (+6 -0)
📝 MediaBrowser.Model/Entities/MediaStream.cs (+6 -46)
📝 tests/Jellyfin.Model.Tests/Entities/MediaStreamTests.cs (+43 -0)

📄 Description

Changes
This PR fixes the issue where subtitle files named with .zh-CN display as generic "Chinese" instead of "Chinese (Simplified)" in the UI.

The root cause was that DisplayTitle used .NET's CultureInfo.GetCultures(NeutralCultures) to resolve language names. Since zh-CN is a specific culture (not a neutral one), it would fall back to the base language code and return "Chinese" instead of the more specific variant.

The fix adds a LocalizedLanguage property to MediaStream that gets populated using Jellyfin's existing LocalizationManager.FindLanguageInfo() when streams are retrieved from the database. This properly leverages the iso6392.txt mappings which already correctly map zh-cn to "Chinese (Simplified)".

This follows the same pattern already used for other localized properties like LocalizedDefault and LocalizedExternal.

Issues
Fixes #15935


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/15947 **Author:** [@ZeusCraft10](https://github.com/ZeusCraft10) **Created:** 1/5/2026 **Status:** ✅ Merged **Merged:** 1/18/2026 **Merged by:** [@Bond-009](https://github.com/Bond-009) **Base:** `master` ← **Head:** `fix/issue-15935-chinese-subtitle-display` --- ### 📝 Commits (1) - [`9039077`](https://github.com/jellyfin/jellyfin/commit/90390772869495228793e1b29db20c8741a309de) Fix zh-CN subtitle language display ### 📊 Changes **3 files changed** (+55 additions, -46 deletions) <details> <summary>View changed files</summary> 📝 `Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs` (+6 -0) 📝 `MediaBrowser.Model/Entities/MediaStream.cs` (+6 -46) 📝 `tests/Jellyfin.Model.Tests/Entities/MediaStreamTests.cs` (+43 -0) </details> ### 📄 Description **Changes** This PR fixes the issue where subtitle files named with `.zh-CN` display as generic "Chinese" instead of "Chinese (Simplified)" in the UI. The root cause was that `DisplayTitle` used .NET's `CultureInfo.GetCultures(NeutralCultures)` to resolve language names. Since `zh-CN` is a specific culture (not a neutral one), it would fall back to the base language code and return "Chinese" instead of the more specific variant. The fix adds a `LocalizedLanguage` property to `MediaStream` that gets populated using Jellyfin's existing `LocalizationManager.FindLanguageInfo()` when streams are retrieved from the database. This properly leverages the `iso6392.txt` mappings which already correctly map `zh-cn` to "Chinese (Simplified)". This follows the same pattern already used for other localized properties like `LocalizedDefault` and `LocalizedExternal`. **Issues** Fixes #15935 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 07:30:24 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#14474