Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8856523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:22:32+00:00 2026-06-14T14:22:32+00:00

Reading through the HTTP specification I came across the terms language-tag and language-range. The

  • 0

Reading through the HTTP specification I came across the terms “language-tag” and “language-range”. The standard defines the difference between these two entities as the following:

A language-range matches a language-tag if it exactly equals the tag, or if it exactly equals a prefix of the tag such that the first tag character following the prefix is "-".

However, the document doesn’t augment this statment by any of examples. So, how does the language-range differ from the language-tag in the following HTTP header field:

Accept-Language: en, en-gb, en-us

And if they don’t differ here, could you give any examples where they do.

Updated


I’d rephrase the aforementioned citation in the following manner:

A language is considered acceptable if its tag or the tag’s prefix exactly equals a language range which was specified in the Accept-Language field.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:22:33+00:00Added an answer on June 14, 2026 at 2:22 pm

    The RFC does provide an example. If you look at the specification of the Accept-Language request header:

    The Accept-Language request-header field is similar to Accept, but
    restricts the set of natural languages that are preferred as a
    response to the request. Language tags are defined in section 3.10.

      Accept-Language = "Accept-Language" ":"
    
                         1#( language-range [ ";" "q" "=" qvalue ] )
    
      language-range  = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" )
    

    […]

      Accept-Language: da, en-gb;q=0.8, en;q=0.7
    

    […] "I prefer Danish, but will accept British English and
    other types of English."

    Section 3.10 mentions:

    The name space of language tags is administered by the IANA.

    So all language tags are registered here. Enter RFC 2616:

    A language-range (as used in an Accept-Language header) matches a language-tag if
    it exactly equals the tag, or if it exactly equals a prefix of the
    tag such that the first tag character following the prefix is "-".

    So, en in Accept-Language: en matches en-gb and en-US. If the client expects multiple matches for a single range, it should specify the subtags and assign a quality value (;q=) per subtag for best results.

    If it doesn’t, the server gets to decide which available representation it will return.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was reading through this document http://llvm.org/docs/WritingAnLLVMPass.html , where in I came across CallGraphSCCPass
I was reading through the TGA specification found at http://en.wikipedia.org/wiki/Truevision_TGA , and I found
I was just reading through Learning Python by Mark Lutz and came across this
I'm reading through Rob Ashton's excellent blog post on RavenDB: http://codeofrob.com/archive/2010/05/09/ravendb-an-introduction.aspx and I'm working
I an reading through some examples of normalization, however I have come across one
I am reading through http://www.scholarpedia.org/article/SIFT , and I need some help in a definition
I was reading through this: http://www.postgresql.org/about/ And I saw this: An enterprise class database,
I was reading through rails tutorial (http://ruby.railstutorial.org/book/ruby-on-rails-tutorial#sidebar-database_indices) but confused about the explanation of database
I have been reading through lots of Q&A everywhere and these stackoverflow posts seem
Reading through an Article about custom Objects: http://technet.microsoft.com/en-us/library/ff730946.aspx I wonder why i get a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.