Add Accept-Language header support for per-request localization

This commit is contained in:
Shadowghost
2026-05-04 20:26:39 +02:00
parent e9942c3857
commit 4be3f5f1f9
28 changed files with 571 additions and 149 deletions

View File

@@ -77,5 +77,14 @@ namespace MediaBrowser.Controller.Net
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
Task ReceiveAsync(CancellationToken cancellationToken = default);
/// <summary>
/// Applies the culture context captured when the connection was established
/// (from the upgrade request's <c>Accept-Language</c> header) to the current
/// async flow. Server-initiated message senders should call this before
/// localising any payload so that the response uses the client's preferred
/// language rather than the server default.
/// </summary>
void ApplyRequestCulture();
}
}