Skip to content

Per-post (and per-feed) language: how far up the ladder is worth it? #5

Description

@rmdes

Hi Dave (and Dave's Claude) —

Second small Textcasting-alignment idea, filed as an issue to discuss before anyone writes code — and this one is genuinely a question as much as a proposal, so even if the answer is "not now," the thinking might be useful.

Today: one language for the whole server

The server declares a single language for every feed it generates. config.rssLanguage is "en-us" (server/code/rssnetwork.js:28), getDefaultHeadElements copies it onto every feed's head (rssnetwork.js:574), and daverss emits it as the channel <language> (daverss.js:265).

That means every user's feed claims en-us, regardless of what they actually write. A French or Portuguese writer on the server produces feeds that tell readers "this is English." Textcasting lists per-post language as a Tier 2 feature ("the web is multilingual"), but rss.chat isn't even at per-feed language yet — it's per-server.

I think there's a ladder here, and I'm genuinely unsure how far up it is worth climbing for a chat network. Laying out the rungs so you can say where (if anywhere) it fits.

Rung 1 — per-user feed language (cheap, no daverss change)

Let each user set their feed's language, the same way they already set myFeedTitle / myFeedDescription in prefs. buildFeedForUser would use the user's language for that feed's channel <language>, falling back to config.rssLanguage.

  • No schema change beyond prefs (already a JSON blob on users).
  • No daverss change — it already emits channel <language>; we'd just feed it a per-user value instead of the global constant.
  • Fixes the "everyone is en-us" inaccuracy immediately.
  • The everyone-feed stays on the server default (it's mixed-language by nature).

This feels like the 80% win: most people write in one language, and a correct per-feed language is what a feed reader actually keys off.

Rung 2 — per-post language (needs a daverss change)

A lang on individual items, for the genuinely bilingual writer who switches languages post to post.

  • New nullable lang column on items; optional lang param on /newpost and /updatepost (which today take title / description / markdowntext / inReplyTo, rssnetwork.js:~32); pass it through buildFeedItems.
  • daverss would need to emit it per item — RSS 2.0 has no per-item language element, so the options are the standard xml:lang attribute on <item>, or a source:lang element in your namespace. Your call, same as the modified-date question in Emit a per-item modified date in feeds (finishing edit-propagation for Textcasting) #4.
  • JSON Feed 1.1 (if that ever lands — separate idea) has a native item-level language field, so per-post language maps cleanly there without any attribute question.

Rung 3 — resist for now

Auto-detection of a post's language, translation links (contentMap-style). Real Textcasting Tier-2 territory, but over-built for where rss.chat is today. Noting it only to say I'd leave it out.

What I'm actually asking

  1. Does per-feed language (Rung 1) fit your view? It's cheap, needs no daverss change, and fixes a real inaccuracy — I'd happily send just that as a small PR if you want it.
  2. Is per-post language (Rung 2) something you'd want in the product at all, or is per-feed enough for a chat network? If yes, that's another source: vs xml:lang naming decision for you.
  3. Or is language something you'd rather not carry yet? Totally fine — this is a "think out loud together" issue, not a request.

No code until you weigh in. As with the modified-date issue, I'm bringing these one at a time so each stays easy to reason about.

Ricardo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions