Files
ccn/Packages/Infrastructure/Sources/Public/Protocols/LocalizedRequestContext.swift
T
2026-08-19 23:19:08 +02:00

15 lines
523 B
Swift

import Hummingbird
/// A request context that carries the language negotiated for the request.
///
/// ``LocalizationMiddleware`` resolves the visitor's preferred language from the `Accept-Language` header and stores it here, so downstream
/// controllers and middleware can serve the matching localization without re-reading the header.
public protocol LocalizedRequestContext: RequestContext {
// MARK: Properties
/// The language identifier negotiated for the request.
var language: String { get set }
}