Twitch - Show Stream Language

Displays the stream language as [EN]/[JA]/etc. Configurable, with two UI modes: a badge on the stream preview or a suffix next to the streamer’s username

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
Vikindor
日安装量
0
总安装量
0
评分
0 0 0
版本
1.5.4
创建于
2025-10-16
更新于
2025-10-16
大小
16.9 KB
许可证
MIT
适用于

Twitch - Show Stream Language

Userscript for browsers that displays stream’s language code like [EN] / [JA] / [ES] right in the Twitch UI. Works on channel preview cards in directories and on the channel page header itself. Two visual modes are available: a top‑right badge on the card or a right‑aligned suffix next to the streamer's username.

✨ Features

  • Detects and shows the stream language (ISO‑like two‑letter codes and common locale variants).
  • Two visual modes:
    • suffix — small label aligned to the right of the streamer's username.
    • badge — compact pill in the top‑right corner of a preview card.
  • Works across SPA navigations (React router) and on initial load.
  • Annotates both directory/browse cards and the channel header.
  • Has several fallbacks when language cannot be determined from GQL.

🖼 Screenshots

Suffixes next to streamers’ usernames

Channels page — Suffix screenshot

Badges on channel preview cards

Channels page — Badge screenshot

Suffix or badge on the stream page

Suffix and badge variants screenshot

🔧 Configuration

Open the script in your userscript manager and change the value of:

const VISUAL_MODE = 'suffix';

suffix - adds label next to the streamer's username.

badge - adds small pill in the top-right corner of the preview card.

⚙ How it works

The script passively listens to Twitch’s SPA updates and XHR GQL responses, extracts language info from fields like broadcasterLanguage, language, and content tags, and maps localized tag names to ISO‑like codes when needed. It then annotates relevant DOM nodes as they appear.

❗ Note

In rare cases, you may see a [??] suffix — this happens when the stream has no language set in GQL and no recognizable custom tags to infer it from. This is a known issue and I’m exploring possible ways to improve detection; it may be resolved in future updates.