The language subtag registry includes many subtags identifying countries, languages or variants such as local dialects. Your favorite language and/or variant is probably already there. But, if it is not, you can ask for the registration of a new subtag. This text explains how, but the complete and authoritative explanation is in RFC 5646, specially its section 3.5, Registration Procedure for Subtags". It is recommended to read at least this section.

Before you start, a warning: the process takes time, documentation and the ability to defend your proposal and to back it with facts and references. Just sending an email saying "People in my hometown speaks Alsatian, I want 'als' to be registered as a language subtag" is not sufficient.

You have different sorts of subtags and the rules are not the same for all:

The process is the following (it is a simplified version; did I tell you to read the full story in section 3.5 of RFC 5646?):

  1. Collect background information, typically references to published descriptions of the language or dialect. A Wikipedia page is possible but may be insufficient, specially since the page may change easily. Stable references are preferred.
  2. Choose a subtag which must conform to the syntax rules explained in RFC 5646 (section 2.1). A variant subtag must be either a string of five to eight alphanumeric characters, or a string of four alphanumeric characters, starting with a digit. So, valencian is illegal (too long) while valencia is legal. 1996 is legal, too, but not 732.
  3. Fill-in the registration form whose template is:
       LANGUAGE SUBTAG REGISTRATION FORM
       1. Name of requester:
       2. E-mail address of requester:
       3. Record Requested:
    
          Type:
          Subtag:
          Description:
          Prefix:
          Preferred-Value:
          Deprecated:
          Suppress-Script:
          Comments:
    
       4. Intended meaning of the subtag:
       5. Reference to published description
          of the language (book or article):
       6. Any other relevant information:
    
    Pay special attention to Prefix (in practice, most variants have a Prefix, which is the main language of this variant, such as ca for valencian).
    Think twice about Description (in general a short one-line sentence) and Comments (which may be longer), because the consistency of tagging among different taggers will heavily depend on the quality of these fields.
    Keep detailed scholar references for the Reference section of the request: the registry is not a library.
    Some fields are typically not used for a variant such as Suppress-Script.
  4. Send it to the mailing list ietf-languages@iana.org (you may choose to subscribe to the mailing list before, to get an idea of the people and discussions, and to be sure to have the complete thread).
  5. Reply to questions, address objections, be prepared to modify your registration form and keep cool.

Let's see a complete example showing many issues (thanks to CE Whitehead for the nice example). The current registry has three entries for the french language, fr for today's French, frm for Middle French (the language spoken during the Renaissance) and fro for Old French (the language spoken during the Middle Age). This is not always sufficiently fine-grained to classify some old texts. So, here is a possible proposal to register a variant, 1606Nict, for the late Middle French, as described in the famous Nicot's book:

LANGUAGE SUBTAG REGISTRATION FORM
1. Name of requester:  C. E. Whitehead
2. E-mail address of requester: cewcathar@hotmail.com
3. Record Requested:
Type: Variant
Subtag:  1606Nict
        (or alternately 16siecle)
Description: Late Middle French
Prefix: frm
Preferred-Value:
Deprecated:
Suppress-Script:
Comments: French as catalogued in Jean Nicot, "Thresor de la langue francoyse" 1606

4. Intended meaning of the subtag:
5. Reference to published description
of the language (book or article):

* Joachim du Bellay, La deffence et illustration de la langue francoyse,
1549; ed critique by Henri Chamard, Geneve, Slatkine Rpt. 1969

* Jean Nicot, "Thresor de la langue francoyse" 1606; ARTFL Project,
University of Chicago:
http://portail.atilf.fr/dictionnaires/TLF-NICOT/index.htm

6. Any other relevant information:
See second request below

Do note the detailed references and the use of Prefix to clearly state that it is a variant of Middle French.

Let's see a second example from the same author, with the added difficulty that we use XML-like encoding for the composed characters (see section 3.1 of RFC 5646). This specificies the early modern French, as described by the french academy:

LANGUAGE SUBTAG REGISTRATION FORM
1. Name of requester:  C. E. Whitehead
2. E-mail address of requester: cewcathar@hotmail.com
3. Record Requested:

Type: Variant
Subtag:  1694acad
            (alternately 17siecle)
Description: Early modern French
Prefix: fr 
Preferred-Value:
Deprecated:
Suppress-Script:
Comments:  As catalogued in the "Dictionnaire de
l'académe françoise", 4eme ed. 1694; includes
elements of Middle French; also new terms from the Americas

4. Intended meaning of the subtag:
5. Reference to published description
of the language (book or article):

* Dictionnaire de l'académie françoise, 4eme ed. 1694; RTFL Project,
University of Chicago:
http://portail.atilf.fr/dictionnaires/ACADEMIE/index.htm

* Fénelon, François de Salignac de La Mothe (1984), Fenelon's Letter to the
French Academy : with an introduction and commentary.

* Ayres-Bennett, Wendy (2004), Sociolinguistic variation in
seventeenth-century France : methodology and case studies.

also:
* http://www.tsl.state.tx.us/treasures/giants/lasalle/lasalle-cover.html
 http://teacherweb.com/FL/Cocoa/CEWhitehead/HTMLPage15.stm

It is probably useful to list some mistakes that people seem to make often. Keep in mind that:

Thanks for reading and good luck for your future subtag registrations. Remember: it may seems difficult but it is worth it.