Class ContentLanguage
- All Implemented Interfaces:
Serializable
,Cloneable
,Header
,NameValuePair
The natural language or languages of the intended audience for the enclosed content.
Example
Content-Language: da
RFC2616 Specification
The Content-Language entity-header field describes the natural language(s) of the intended audience for the enclosed entity. Note that this might not be equivalent to all the languages used within the entity-body.Content-Language = "Content-Language" ":" 1#language-tag
Language tags are defined in section 3.10. The primary purpose of Content-Language is to allow a user to identify and differentiate entities according to the user's own preferred language. Thus, if the body content is intended only for a Danish-literate audience, the appropriate field is...
Content-Language: da
If no Content-Language is specified, the default is that the content is intended for all language audiences. This might mean that the sender does not consider it to be specific to any natural language, or that the sender does not know for which language it is intended.
Multiple languages MAY be listed for content that is intended for multiple audiences. For example, a rendition of the "Treaty of Waitangi," presented simultaneously in the original Maori and English versions, would call for...
Content-Language: mi, en
However, just because multiple languages are present within an entity does not mean that it is intended for multiple linguistic audiences. An example would be a beginner's language primer, such as "A First Lesson in Latin," which is clearly intended to be used by an English-literate audience. In this case, the Content-Language would properly only include "en".
Content-Language MAY be applied to any media type -- it is not limited to textual documents.
See Also:
-
Constructor Summary
ConstructorDescriptionContentLanguage
(String value) Constructor.ContentLanguage
(String... value) Constructor.ContentLanguage
(Supplier<String[]> value) Constructor with delayed value. -
Method Summary
Modifier and TypeMethodDescriptionstatic ContentLanguage
Static creator.static ContentLanguage
Static creator.static ContentLanguage
Static creator with delayed value.Methods inherited from class org.apache.juneau.http.header.BasicCsvHeader
asArray, asList, assertList, contains, containsIgnoreCase, getValue, of, of, of, orElse, toArray, toList
Methods inherited from class org.apache.juneau.http.header.BasicHeader
assertName, assertStringValue, asString, equals, equalsIgnoreCase, get, getElements, getName, hashCode, isNotEmpty, isPresent, of, of, orElse, toString
-
Constructor Details
-
ContentLanguage
Constructor.- Parameters:
value
- The header value.
Can benull .
-
ContentLanguage
Constructor.- Parameters:
value
- The header value.
Can benull .
-
ContentLanguage
Constructor with delayed value.Header value is re-evaluated on each call to
BasicCsvHeader.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .
-
-
Method Details
-
of
Static creator.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
of
Static creator.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
of
Static creator with delayed value.Header value is re-evaluated on each call to
BasicCsvHeader.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-