mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #15947] [MERGED] Fix zh-CN subtitle language display #14474
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
master← Head:fix/issue-15935-chinese-subtitle-display📝 Commits (1)
9039077Fix 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-CNdisplay as generic "Chinese" instead of "Chinese (Simplified)" in the UI.The root cause was that
DisplayTitleused .NET'sCultureInfo.GetCultures(NeutralCultures)to resolve language names. Sincezh-CNis 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
LocalizedLanguageproperty toMediaStreamthat gets populated using Jellyfin's existingLocalizationManager.FindLanguageInfo()when streams are retrieved from the database. This properly leverages theiso6392.txtmappings which already correctly mapzh-cnto "Chinese (Simplified)".This follows the same pattern already used for other localized properties like
LocalizedDefaultandLocalizedExternal.Issues
Fixes #15935
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.