|
45 | 45 | <script>document.getElementById('header-boilerplate').innerHTML = bp_appHeader('/images/world.gif', 'Language subtag lookup','');</script>
|
46 | 46 | </header>
|
47 | 47 |
|
48 |
| -<div class="section"> |
49 |
| - <div id="search"> |
50 |
| - <p><strong class="task">Find</strong> <br/> |
51 |
| - a subtag by searching for text in the descriptions <a href="#note2" class="explanation">See note 2.</a> <br /> |
52 |
| - <input type="text" name="find" id="findinput" onChange="find(document.getElementById('findinput').value.toLowerCase()); displayResults('find');" /> |
53 |
| - <input onClick="find(document.getElementById('findinput').value.toLowerCase()); displayResults('find');" type="submit" value="Find" /> |
54 |
| - </p> |
55 |
| - |
56 |
| - <p><strong class="task">Look up</strong><br/> |
57 |
| -one or more subtags <a href="#note3" class="explanation">See note 3.</a><br /> |
58 |
| - <input id="lookupinput" type="text" name="lookup" onchange="lookup(document.getElementById('lookupinput').value); displayResults('lookup');" /> |
59 |
| - <input onClick="lookup(document.getElementById('lookupinput').value); displayResults('lookup');" type="submit" value="Look up" /> |
60 |
| - </p> |
61 |
| - </div> |
62 |
| - <div id="check"> |
63 |
| - <p> <strong class="task">Check</strong> <br> |
64 |
| - whether a hyphen-separated tag is valid and well-formed <a href="#note4" class="explanation">See note 4.</a><br /> |
65 |
| - <input id="checkinput" type="text" name="check" onChange="parseTag(document.getElementById('checkinput').value); displayResults('check');" /> |
66 |
| - <input type="submit" value="Check" onClick="parseTag(document.getElementById('checkinput').value); displayResults('check');" /> |
67 |
| - </p> |
68 |
| - |
69 |
| - <p><strong class="task">List</strong><br/> |
70 |
| - all tags of the following type<br /> |
71 |
| - <select id="listselect" onChange="showList(document.getElementById('listselect').value); displayResults('list');"> |
72 |
| - <option value="0">Choose...</option> |
73 |
| - <option value="language">Languages (takes a while!)</option> |
74 |
| - <option value="extlang">Extlangs</option> |
75 |
| - <option value="scripts">Scripts</option> |
76 |
| - <option value="regions">Regions</option> |
77 |
| - <option value="variant">Variants</option> |
78 |
| - <option value="grandfathered">Grandfathered</option> |
79 |
| - </select> |
80 |
| - <input onclick="showList(document.getElementById('listselect').value); displayResults('list');" type="submit" value="List" name="submit" /> |
81 |
| - </p> |
82 |
| - </div> |
83 |
| - <br style="clear:left" /> |
| 48 | +<div class="section"><br style="clear:left" /> |
84 | 49 | </div>
|
85 | 50 |
|
86 | 51 | <div id="errors"></div>
|
87 | 52 |
|
88 | 53 | <div id="out"></div>
|
89 |
| - |
90 |
| - |
91 |
| -<div id="showNotes" style="margin-left: 7.5%" onclick="toggleNotes()">show notes</div> |
92 |
| - |
93 |
| -<div id="detailednotes" style="display:none"> |
94 |
| -<aside class="sidebar"> |
95 |
| - <div class="section"> |
96 |
| - <h2 class="flush">Related links</h2> |
97 |
| - <p><a target="_blank" href="http://www.w3.org/International/articles/language-tags/">About language subtags</a></p> |
98 |
| - <p><a target="_blank" href="http://www.iana.org/assignments/language-subtag-registry">IANA subtag registry</a></p> |
99 |
| - <h2>Version information</h2> |
100 |
| - <p>Currently supports the IANA Subtag registry of 2016-10-12. The tool currently reports subtags for 8,115 languages, 232 extlangs, 188 scripts, 303 regions, 80 variants, and 26 grandfathered subtags. Please report any bugs to <a href=" mailto:[email protected]" >me </a>. </p> |
101 |
| - </div> |
102 |
| -</aside> |
103 |
| - |
104 |
| -<p id="status">Updated Mon 23 Jan 2017 • tags <a href="http://rishida.net/blog/index.php?tag=subtags" title="Show all blog posts tagged with 'subtags'">subtags</a>, <a href="http://rishida.net/blog/?tag=apps" title="Show all blog posts tagged with 'apps'">apps</a></p> |
105 |
| - |
106 |
| -<div class="section"> |
107 |
| - <p>BCP 47 language tags are built from subtags in the IANA Subtag Registry. This tool helps you find or look up subtags and check for errors in language tags.</p> |
108 |
| - <p>Read <a href="http://www.w3.org/International/questions/qa-choosing-language-tags">Choosing a Language Tag</a> for step-by-step guidelines on creating language tags. This tool also provides information to guide your choices.</p> |
109 |
| - <h2>Usage notes</h2> |
110 |
| - <p><strong><span class="notenumber">1</span> Raw data. </strong>Click on the results with a coloured background to see the raw IANA data for a subtag.</p> |
111 |
| - <p><strong><span class="notenumber" id="note2">2</span> Find.</strong> The description is the name of the subtag, ie. the language, region, etc. You can search on any part of a description (eg. <a href="/apps/subtags/?find=eng">eng</a> gives results that include B<strong>eng</strong>ali, <strong>Eng</strong>lish and T<strong>eng</strong>war). Note that some languages may be spelled differently, eg. <a href="/apps/subtags/?find=panjabi">Panjabi</a> yields three results, but <a href="/apps/subtags/?find=punjabi">Punjabi</a> only one.</p> |
112 |
| - <p><strong><span id="note3" class="notenumber">3</span> Look up. </strong> Looks up all forms of all subtags in the list, eg. it returns both a language and extlang subtag for <a href="/apps/subtags/?lookup=cmn">cmn</a>, and it returns both language and region subtags for the CA in <a href="/apps/subtags/?lookup=en-CA">en-CA</a>. Subtags can be separated by commas, semicolons, hyphens, or spaces, eg. <a href="/apps/subtags/?lookup=en%3B%20fr%2C%20ca%2C%20Bali-1901">en; fr, ca, Bali-1901</a>.<br /> |
113 |
| - Only exact matches of subtags are returned, ie. <a href="/apps/subtags/?lookup=ak">ak</a> doesn't match <a href="/apps/subtags/?lookup=akk">akk</a>. <br /> |
114 |
| - If there is no output for a tag, it was not a valid tag in the registry.</p> |
115 |
| - <p><strong><span id="note4" class="notenumber">4</span> Check.</strong> Looks up all subtags in a language tag (ie. a hyphen-separated list of subtags) and reports problems, if there are any, eg. <a href="/apps/subtags/?check=de-419-DE-alt">de-419-DE-alt</a> and <a href="/apps/subtags/?check=ms-cmn">ms-cmn</a>.<br /> |
116 |
| - Warnings are also displayed to guide you in language choices. Example: <a href="/apps/subtags/?check=ms-min-latn">ms-min-Latn</a>.<br /> |
117 |
| - </p> |
118 |
| - <p><strong><span class="notenumber">5</span> <img src="images/ethn.png" alt="Green button with E on it" /></strong> provides a link from a language subtag entry to the SIL Ethnologue. This is useful when trying to find a language. If there is no page for a given language tag, such as <a href="/apps/subtags/?lookup=nn">nn</a>, click on the result to reveal the full record; if there is a macrolanguage specified, eg. 'no', that will probably yield an ethnologue entry.</p> |
119 |
| - <p><strong><span class="notenumber">6</span> <img src="images/univ.png" alt="Lilac button with U on it" /></strong> provides a link from a script subtag entry to the most relevant Unicode script block in UniView.<br /> |
120 |
| - In some cases, there are additional Unicode areas dedicated to the same script. These can usually be easily found alongside the current block in UniView's pull-down control. <br /> |
121 |
| - Some very large blocks such as Han, Hangul and Egyptian Hieroglyphs are not linked to. Other scripts do not yet have Unicode blocks. </p> |
122 |
| - <p><strong><span class="notenumber">7</span> <img src="images/wikipedia.png" alt="White button with W on it" /></strong> provides a link from a language or script subtag entry to search Wikipedia. It uses the description as the search key. </p> |
123 |
| - <p><strong><span class="notenumber">8</span> Grandfathered tags</strong> are pre-RFC 4646 registrations of tags that cannot be completely composed |
124 |
| - from the subtags in the current registry. If you search for a grandfathered tag it will be displayed in the results, |
125 |
| - and the subtags that are in the current registry will also be shown.</p> |
126 |
| - <p><strong><span class="notenumber">9</span> Redundant tags</strong> are pre-RFC 4646 registrations of tags that can now be formed by |
127 |
| - combining separate subtags from the current registry. They do not show up in search results.</p> |
128 |
| - |
129 |
| -</div> |
| 54 | +<div id="detailednotes" style="display:block"> |
| 55 | + <p>This app is now available at <a href="https://r12a.github.io/app-subtags/">https://r12a.github.io/app-subtags/</a></p> |
130 | 56 | </div>
|
131 | 57 |
|
132 |
| -<div class="smallprint"><span id="version">First published 1 Apr 2007. This version <span id="version-info"> |
133 |
| - <!-- #BeginDate format:IS1m -->2017-01-23 12:54<!-- #EndDate --> |
134 |
| - </span> GMT. • Copyright <a href=" mailto:[email protected]" >[email protected]</a>. Licence GNU-GPL (see source code). </span></div> |
135 |
| - |
136 |
| -<script type="text/javascript"> |
137 |
| -// check for parameters and take appropriate action |
138 |
| -parameters = location.search.split('&') |
139 |
| -parameters[0] = parameters[0].substring(1) |
140 |
| -for (var p=0;p<parameters.length;p++) { |
141 |
| - pairs = parameters[p].split('=') |
142 |
| - if (pairs[0] == 'find' && pairs[1]) { |
143 |
| - // parseTag(document.getElementById('checkinput').value); displayResults('check'); |
144 |
| - document.getElementById('findinput').value = pairs[1] |
145 |
| - find(document.getElementById('findinput').value.toLowerCase()) |
146 |
| - displayResults('find') |
147 |
| - } |
148 |
| - if (pairs[0] == 'lookup' && pairs[1]) { |
149 |
| - document.getElementById('lookupinput').value = decodeURIComponent(pairs[1]) |
150 |
| - lookup(document.getElementById('lookupinput').value) |
151 |
| - displayResults('lookup'); |
152 |
| - } |
153 |
| - if (pairs[0] == 'check' && pairs[1]) { |
154 |
| - document.getElementById('checkinput').value = pairs[1] |
155 |
| - parseTag(document.getElementById('checkinput').value) |
156 |
| - displayResults('check'); |
157 |
| - } |
158 |
| - if (pairs[0] == 'list' && pairs[1]) { |
159 |
| - document.getElementById('listselect').value = pairs[1] |
160 |
| - showList(document.getElementById('listselect').value) |
161 |
| - displayResults('list'); |
162 |
| - } |
163 |
| - } |
164 |
| - |
165 |
| - </script> |
166 |
| - |
167 | 58 | </body>
|
168 | 59 | </html>
|
0 commit comments