<?php 
// authors should fill in these assignments:
$directory = 'questions/'; // the directory path below /International up to but not including the file name: must end in a slash! 
$filename = 'qa-lang-2or3'; // the file name WITHOUT extensions
$authors = 'Martin Dürst, W3C'; // author(s) and affiliations
$modifiers = 'Richard Ishida, W3C'; // people making substantive changes, and their affiliation
$searchString = 'qa-lang-2or3'; // blog search string - usually the filename without extensions
$firstPubDate = '2003-08-14'; // date of the first publication of the document (after review)
$lastSubstUpdate = '2010-09-02  17:19';  // date of last substantive changes to this document
$pathtophp = '../php'; // authors should check that the following points to /International/php - must be relative path

// authors AND translators should fill in these assignments:
$clang = 'en'; // the language extension for articles in this language (use 'en' for English)
$isTranslation = 'no';  // set to 'yes' if this is a translation !
$copyrightYear = '2003-2010'; // this year, but may also be a range, eg. 2002-2006
$thisVersion = '2010-09-02  17:19'; // date of latest edits to this document/translation

// translators should fill in these assignments:
$translators = 'xxxNAME, ORG'; // translator(s) and their affiliation - a elements allowed, but use double quotes for attributes
$enVersion = 'xxxYYYY-MM-DD';  // date of the English original on which the translation is based (see last substantive change date at bottom of file)

include($pathtophp.'/bp3/boilerplate-'.$clang.'.php');

if (! isset($s_articles)) { $s_articles = "Articles"; }
$breadcrumbs = <<<eot
<a href='/International/'>$s_home </a> &gt; <a href='/International/resources'>$s_resources</a> &gt; <a href='/International/articlelist#language'>$s_articles</a>
eot;

$toc = <<<eot
<ol>
<li><a href="#question">$s_questionLink</a></li>
<li><a href="#background">$s_backgroundLink</a></li>
<li><a href="#answer">$s_answerLink</a></li>
<li><a href="#endlinks">$s_furtherReadingLink</a></li>
</ol>
eot;

$additionalLinks = <<<eot
eot;
include($pathtophp.'/bp3/structure.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html <?php echo "lang='$clang' xml:lang='$clang'";?> xmlns="http://www.w3.org/1999/xhtml">
<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>Two-letter or three-letter language codes</title>
		<meta name="keywords" content="i18n internationalisation internationalization localisation localization translation language codes iso 639" />
		<meta name="description" content="W3C I18N FAQ: Should I use two-letter or three-letter language codes?" />
<?php echo $headincludes;?>

<link rel="stylesheet" href="/International/style/article-standards-v2.css" type="text/css" />
</head>

	<body>
		<span id="version-info" style="display: none;"><!-- #BeginDate format:IS1m -->2010-09-02  18:01<!-- #EndDate --></span> <?php echo $topOfPage; ?>

		<h1>Two-letter or three-letter language codes</h1>

		<div class="section"><a id="contentstart" name="contentstart" tabindex="1"></a> 
			<div id="audience"> 
				<p><?php echo $intendedAudience?> XHTML/HTML coders (using editors or scripting), script developers (PHP, JSP, etc.), CSS coders, schema developers (DTDs, XML Schema, RelaxNG, etc.), XSLT developers, Web project managers, and anyone who needs advice on using language tags in markup and style sheets.</p>
			<?php if ($outOfDateTranslation == 'yes') { echo "<p class='outofdate'>$s_untranslatedChanges </p>"; } ?>
			</div>

			<h2><?php echo $questionHead?></h2>
			<div class="section2"> 
				<p class="question">Should I use two-letter or three-letter ISO language codes in language tags?</p>
			</div>
		</div>
		<p class="background-link noprint"><?php echo $skiptoAnswer?></p>
		<div class="section"> 

			<h2><?php echo $backgroundHead?></h2>
			<p>The Internet and the Web uses language tags to indicate the natural language of text in protocols and formats, such as
				<a href="http://www.w3.org/TR/REC-html40/types.html#h-6.8">HTML</a>, <a href="http://www.w3.org/TR/xhtml1/#C_7">XHTML</a>,
				<a href="http://www.w3.org/TR/REC-xml#sec-lang-tag">XML</a>, <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.10">HTTP</a>, and
				others. In the past the language tag values were defined by <a href="http://www.ietf.org/rfc/rfc3066.txt">RFC 3066 <cite>Tags for the Identification of
				Languages</cite></a> (and its predecessor <a href="http://www.ietf.org/rfc/rfc1766.txt">RFC 1766</a>) and began with either a
				<a href="http://www.loc.gov/standards/iso639-2/langcodes.html">ISO 639-1 two-letter language code</a> or
				<a href="http://www.loc.gov/standards/iso639-2/langcodes.html">ISO 639-2 three-letter code</a>. For some languages there were both two-letter and
				three-letter alternatives in the ISO codes. (And for some languages there were even two three-letter alternatives to choose from.)</p>
			<p>People were sometimes confused about which ISO code they should use in a language tag. </p>
		</div>
		<div class="section"> 

			<h2><?php echo $answerHead?></h2>
			<p>The good news is that you don't need to worry about this question any more!</p>
			<p>The current  IETF  specification describing how to create language tags is referred to as
				<a href="http://www.rfc-editor.org/rfc/rfc4646.txt">BCP 47</a>.  This no longer refers you to the ISO code lists. Instead you should look for the
				appropriate subtags in the new IANA <a href="http://www.iana.org/assignments/language-subtag-registry"><cite>Language Subtag Registry</cite></a>. This registry
				contains only one subtag per language, so there is no longer any ambiguity.</p>
			<p>Although you now need to look in the IANA Language Subtag Registry rather than the ISO code lists, the language tags you have been using
				so far don't need to change (as long as you followed the 'shortest code' rule). This is just a change in how you access them.</p>
			<p>The IANA Language Subtag Registry still uses, and keeps up to date with, codes from the ISO standards, but the registry maintainers take
				care of the 2- or 3-letter rule. </p>
			<p>For more information about how to use the new language tag syntax and the registry, see the articles
				<a href="/International/articles/language-tags/"><cite>Language Tags in HTML and XML</cite></a> and <a href="/International/questions/qa-choosing-language-tags"><cite>Choosing a Language Tag</cite></a>.</p>
		</div>
<?php printf( $survey, $directory, $filename, $clang );?>
		<div class="section noprint"> 

			<h2><?php echo $readingHead?></h2>
			<ul id="full-links">
				<li>
					<p>Getting started? <a href="/International/getting-started/language"><cite>Language on the Web</cite></a> <span class="uri">http://www.w3.org/International/getting-started/language</span></p>
				</li>
				<li>
					<p>Tutorial, <a href="/International/tutorials/language-decl/"><cite>Declaring Language in XHTML and HTML</cite></a> <span class="uri">http://www.w3.org/International/tutorials/language-decl/</span></p>
				</li>
				<li> 
					<p><a href="/International/articles/language-tags/"><cite>Language Tags in HTML and XML</cite></a> <span
						class="uri">http://www.w3.org/International/articles/language-tags/</span></p>
				</li>
				<li>
					<p><a href="/International/questions/qa-choosing-language-tags"><cite>Choosing a Language Tag</cite></a> <span
						class="uri">http://www.w3.org/International/questions/qa-choosing-language-tags</span></p>
				</li>
				<li> 
					<p><a href="http://www.iana.org/assignments/language-subtag-registry"><cite>Language Subtag Registry</cite></a><span class="uri">http://www.iana.org/assignments/language-subtag-registry</span></p>
				</li>
				<li> 
					<p><a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt"><cite>BCP 47 (Tags for Identifying Languages)</cite></a> <span class="uri">http://www.rfc-editor.org/rfc/rfc4646.txt</span></p>
				</li>
				<li>
					<p>Related links, <cite>Authoring HTML &amp; CSS</cite> – <a href="/International/techniques/authoring-html#language">Language</a> <span class="uri">http://www.w3.org/International/techniques/authoring-html#language</span> – <a href="/International/techniques/authoring-html#langvalues">Choosing language values</a> <span class="uri">http://www.w3.org/International/techniques/authoring-html#langvalues</span></p>
				</li>
				<li>
					<p>Related links, <cite>Authoring XML</cite> – <a href="/International/techniques/authoring-xml#language">Language</a> <span class="uri">http://www.w3.org/International/techniques/authoring-html#language</span> – <a href="/International/techniques/authoring-xml#langvalues">Choosing language values</a> <span class="uri">http://www.w3.org/International/techniques/authoring-html#langvalues</span></p>
				</li>
			</ul>
			<ul id="full-links2">
				<li>
					<p>Related links, <cite>Authoring SVG</cite> – <a href="/International/techniques/authoring-svg#language">Language</a> <span class="uri">http://www.w3.org/International/techniques/authoring-html#language</span> – <a href="/International/techniques/authoring-svg#langvalues">Choosing language values</a> <span class="uri">http://www.w3.org/International/techniques/authoring-html#langvalues</span></p>
				</li>
			</ul>
		</div>
<?php echo $bottomOfPage; ?>

	</body>
</html>

