Array
extension Array where Element == Locale
-
Formats locales as a value suitable for the
Accept-LanguageHTTP header.Produces a comma-separated list of language tags with descending q-values. The first locale is unweighted; subsequent entries decrement by 0.1 down to a minimum of 0.1.
Declaration
Swift
public func toAcceptLanguage() -> StringReturn Value
A properly formatted
Accept-Languagevalue, or an empty string if no locales.
View on GitHub