Debian Codegraph @

upstream/opensuse-tumbleweed/man3/I18N::LangTags.3pm

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "I18N::LangTags 3pm"
61 .TH I18N::LangTags 3pm 2026-03-09 "perl v5.42.1" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 I18N::LangTags \- functions for dealing with RFC3066\-style language tags
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 .Vb 1
71 \& use I18N::LangTags();
72 .Ve
73 .PP
74 \&...or specify whichever of those functions you want to import, like so:
75 .PP
76 .Vb 1
77 \& use I18N::LangTags qw(implicate_supers similarity_language_tag);
78 .Ve
79 .PP
80 All the exportable functions are listed below \-\- you\*(Aqre free to import
81 only some, or none at all. By default, none are imported. If you
82 say:
83 .PP
84 .Vb 1
85 \& use I18N::LangTags qw(:ALL)
86 .Ve
87 .PP
88 \&...then all are exported. (This saves you from having to use
89 something less obvious like \f(CW\*(C`use I18N::LangTags qw(/./)\*(C'\fR.)
90 .PP
91 If you don\*(Aqt import any of these functions, assume a \f(CW&I18N::LangTags::\fR
92 in front of all the function names in the following examples.
93 .SH DESCRIPTION
94 .IX Header "DESCRIPTION"
95 Language tags are a formalism, described in RFC 3066 (obsoleting
96 1766), for declaring what language form (language and possibly
97 dialect) a given chunk of information is in.
98 .PP
99 This library provides functions for common tasks involving language
100 tags as they are needed in a variety of protocols and applications.
101 .PP
102 Please see the "See Also" references for a thorough explanation
103 of how to correctly use language tags.
104 .IP \(bu 4
105 the function is_language_tag($lang1)
106 .Sp
107 Returns true iff \f(CW$lang1\fR is a formally valid language tag.
108 .Sp
109 .Vb 3
110 \& is_language_tag("fr") is TRUE
111 \& is_language_tag("x\-jicarilla") is FALSE
112 \& (Subtags can be 8 chars long at most \-\- \*(Aqjicarilla\*(Aq is 9)
113 \&
114 \& is_language_tag("sgn\-US") is TRUE
115 \& (That\*(Aqs American Sign Language)
116 \&
117 \& is_language_tag("i\-Klikitat") is TRUE
118 \& (True without regard to the fact noone has actually
119 \& registered Klikitat \-\- it\*(Aqs a formally valid tag)
120 \&
121 \& is_language_tag("fr\-patois") is TRUE
122 \& (Formally valid \-\- altho descriptively weak!)
123 \&
124 \& is_language_tag("Spanish") is FALSE
125 \& is_language_tag("french\-patois") is FALSE
126 \& (No good \-\- first subtag has to match
127 \& /^([xXiI]|[a\-zA\-Z]{2,3})$/ \-\- see RFC3066)
128 \&
129 \& is_language_tag("x\-borg\-prot2532") is TRUE
130 \& (Yes, subtags can contain digits, as of RFC3066)
131 .Ve
132 .IP \(bu 4
133 the function extract_language_tags($whatever)
134 .Sp
135 Returns a list of whatever looks like formally valid language tags
136 in \f(CW$whatever\fR. Not very smart, so don\*(Aqt get too creative with
137 what you want to feed it.
138 .Sp
139 .Vb 2
140 \& extract_language_tags("fr, fr\-ca, i\-mingo")
141 \& returns: (\*(Aqfr\*(Aq, \*(Aqfr\-ca\*(Aq, \*(Aqi\-mingo\*(Aq)
142 \&
143 \& extract_language_tags("It\*(Aqs like this: I\*(Aqm in fr \-\- French!")
144 \& returns: (\*(AqIt\*(Aq, \*(Aqin\*(Aq, \*(Aqfr\*(Aq)
145 \& (So don\*(Aqt just feed it any old thing.)
146 .Ve
147 .Sp
148 The output is untainted. If you don\*(Aqt know what tainting is,
149 don\*(Aqt worry about it.
150 .IP \(bu 4
151 the function same_language_tag($lang1, \f(CW$lang2\fR)
152 .Sp
153 Returns true iff \f(CW$lang1\fR and \f(CW$lang2\fR are acceptable variant tags
154 representing the same language\-form.
155 .Sp
156 .Vb 10
157 \& same_language_tag(\*(Aqx\-kadara\*(Aq, \*(Aqi\-kadara\*(Aq) is TRUE
158 \& (The x/i\- alternation doesn\*(Aqt matter)
159 \& same_language_tag(\*(AqX\-KADARA\*(Aq, \*(Aqi\-kadara\*(Aq) is TRUE
160 \& (...and neither does case)
161 \& same_language_tag(\*(Aqen\*(Aq, \*(Aqen\-US\*(Aq) is FALSE
162 \& (all\-English is not the SAME as US English)
163 \& same_language_tag(\*(Aqx\-kadara\*(Aq, \*(Aqx\-kadar\*(Aq) is FALSE
164 \& (these are totally unrelated tags)
165 \& same_language_tag(\*(Aqno\-bok\*(Aq, \*(Aqnb\*(Aq) is TRUE
166 \& (no\-bok is a legacy tag for nb (Norwegian Bokmal))
167 .Ve
168 .Sp
169 \&\f(CW\*(C`same_language_tag\*(C'\fR works by just seeing whether
170 \&\f(CWencode_language_tag($lang1)\fR is the same as
171 \&\f(CWencode_language_tag($lang2)\fR.
172 .Sp
173 (Yes, I know this function is named a bit oddly. Call it historic
174 reasons.)
175 .IP \(bu 4
176 the function similarity_language_tag($lang1, \f(CW$lang2\fR)
177 .Sp
178 Returns an integer representing the degree of similarity between
179 tags \f(CW$lang1\fR and \f(CW$lang2\fR (the order of which does not matter), where
180 similarity is the number of common elements on the left,
181 without regard to case and to x/i\- alternation.
182 .Sp
183 .Vb 4
184 \& similarity_language_tag(\*(Aqfr\*(Aq, \*(Aqfr\-ca\*(Aq) is 1
185 \& (one element in common)
186 \& similarity_language_tag(\*(Aqfr\-ca\*(Aq, \*(Aqfr\-FR\*(Aq) is 1
187 \& (one element in common)
188 \&
189 \& similarity_language_tag(\*(Aqfr\-CA\-joual\*(Aq,
190 \& \*(Aqfr\-CA\-PEI\*(Aq) is 2
191 \& similarity_language_tag(\*(Aqfr\-CA\-joual\*(Aq, \*(Aqfr\-CA\*(Aq) is 2
192 \& (two elements in common)
193 \&
194 \& similarity_language_tag(\*(Aqx\-kadara\*(Aq, \*(Aqi\-kadara\*(Aq) is 1
195 \& (x/i\- doesn\*(Aqt matter)
196 \&
197 \& similarity_language_tag(\*(Aqen\*(Aq, \*(Aqx\-kadar\*(Aq) is 0
198 \& similarity_language_tag(\*(Aqx\-kadara\*(Aq, \*(Aqx\-kadar\*(Aq) is 0
199 \& (unrelated tags \-\- no similarity)
200 \&
201 \& similarity_language_tag(\*(Aqi\-cree\-syllabic\*(Aq,
202 \& \*(Aqi\-cherokee\-syllabic\*(Aq) is 0
203 \& (no B<leftmost> elements in common!)
204 .Ve
205 .IP \(bu 4
206 the function is_dialect_of($lang1, \f(CW$lang2\fR)
207 .Sp
208 Returns true iff language tag \f(CW$lang1\fR represents a subform of
209 language tag \f(CW$lang2\fR.
210 .Sp
211 \&\fBGet the order right! It doesn\*(Aqt work the other way around!\fR
212 .Sp
213 .Vb 2
214 \& is_dialect_of(\*(Aqen\-US\*(Aq, \*(Aqen\*(Aq) is TRUE
215 \& (American English IS a dialect of all\-English)
216 \&
217 \& is_dialect_of(\*(Aqfr\-CA\-joual\*(Aq, \*(Aqfr\-CA\*(Aq) is TRUE
218 \& is_dialect_of(\*(Aqfr\-CA\-joual\*(Aq, \*(Aqfr\*(Aq) is TRUE
219 \& (Joual is a dialect of (a dialect of) French)
220 \&
221 \& is_dialect_of(\*(Aqen\*(Aq, \*(Aqen\-US\*(Aq) is FALSE
222 \& (all\-English is a NOT dialect of American English)
223 \&
224 \& is_dialect_of(\*(Aqfr\*(Aq, \*(Aqen\-CA\*(Aq) is FALSE
225 \&
226 \& is_dialect_of(\*(Aqen\*(Aq, \*(Aqen\*(Aq ) is TRUE
227 \& is_dialect_of(\*(Aqen\-US\*(Aq, \*(Aqen\-US\*(Aq) is TRUE
228 \& (B<Note:> these are degenerate cases)
229 \&
230 \& is_dialect_of(\*(Aqi\-mingo\-tom\*(Aq, \*(Aqx\-Mingo\*(Aq) is TRUE
231 \& (the x/i thing doesn\*(Aqt matter, nor does case)
232 \&
233 \& is_dialect_of(\*(Aqnn\*(Aq, \*(Aqno\*(Aq) is TRUE
234 \& (because \*(Aqnn\*(Aq (New Norse) is aliased to \*(Aqno\-nyn\*(Aq,
235 \& as a special legacy case, and \*(Aqno\-nyn\*(Aq is a
236 \& subform of \*(Aqno\*(Aq (Norwegian))
237 .Ve
238 .IP \(bu 4
239 the function super_languages($lang1)
240 .Sp
241 Returns a list of language tags that are superordinate tags to \f(CW$lang1\fR
242 \&\-\- it gets this by removing subtags from the end of \f(CW$lang1\fR until
243 nothing (or just "i" or "x") is left.
244 .Sp
245 .Vb 1
246 \& super_languages("fr\-CA\-joual") is ("fr\-CA", "fr")
247 \&
248 \& super_languages("en\-AU") is ("en")
249 \&
250 \& super_languages("en") is empty\-list, ()
251 \&
252 \& super_languages("i\-cherokee") is empty\-list, ()
253 \& ...not ("i"), which would be illegal as well as pointless.
254 .Ve
255 .Sp
256 If \f(CW$lang1\fR is not a valid language tag, returns empty\-list in
257 a list context, undef in a scalar context.
258 .Sp
259 A notable and rather unavoidable problem with this method:
260 "x\-mingo\-tom" has an "x" because the whole tag isn\*(Aqt an
261 IANA\-registered tag \-\- but super_languages(\*(Aqx\-mingo\-tom\*(Aq) is
262 (\*(Aqx\-mingo\*(Aq) \-\- which isn\*(Aqt really right, since \*(Aqi\-mingo\*(Aq is
263 registered. But this module has no way of knowing that. (But note
264 that same_language_tag(\*(Aqx\-mingo\*(Aq, \*(Aqi\-mingo\*(Aq) is TRUE.)
265 .Sp
266 More importantly, you assume \fIat your peril\fR that superordinates of
267 \&\f(CW$lang1\fR are mutually intelligible with \f(CW$lang1\fR. Consider this
268 carefully.
269 .IP \(bu 4
270 the function locale2language_tag($locale_identifier)
271 .Sp
272 This takes a locale name (like "en", "en_US", or "en_US.ISO8859\-1")
273 and maps it to a language tag. If it\*(Aqs not mappable (as with,
274 notably, "C" and "POSIX"), this returns empty\-list in a list context,
275 or undef in a scalar context.
276 .Sp
277 .Vb 1
278 \& locale2language_tag("en") is "en"
279 \&
280 \& locale2language_tag("en_US") is "en\-US"
281 \&
282 \& locale2language_tag("en_US.ISO8859\-1") is "en\-US"
283 \&
284 \& locale2language_tag("C") is undef or ()
285 \&
286 \& locale2language_tag("POSIX") is undef or ()
287 \&
288 \& locale2language_tag("POSIX") is undef or ()
289 .Ve
290 .Sp
291 I\*(Aqm not totally sure that locale names map satisfactorily to language
292 tags. Think REAL hard about how you use this. YOU HAVE BEEN WARNED.
293 .Sp
294 The output is untainted. If you don\*(Aqt know what tainting is,
295 don\*(Aqt worry about it.
296 .IP \(bu 4
297 the function encode_language_tag($lang1)
298 .Sp
299 This function, if given a language tag, returns an encoding of it such
300 that:
301 .Sp
302 * tags representing different languages never get the same encoding.
303 .Sp
304 * tags representing the same language always get the same encoding.
305 .Sp
306 * an encoding of a formally valid language tag always is a string
307 value that is defined, has length, and is true if considered as a
308 boolean.
309 .Sp
310 Note that the encoding itself is \fBnot\fR a formally valid language tag.
311 Note also that you cannot, currently, go from an encoding back to a
312 language tag that it\*(Aqs an encoding of.
313 .Sp
314 Note also that you \fBmust\fR consider the encoded value as atomic; i.e.,
315 you should not consider it as anything but an opaque, unanalysable
316 string value. (The internals of the encoding method may change in
317 future versions, as the language tagging standard changes over time.)
318 .Sp
319 \&\f(CW\*(C`encode_language_tag\*(C'\fR returns undef if given anything other than a
320 formally valid language tag.
321 .Sp
322 The reason \f(CW\*(C`encode_language_tag\*(C'\fR exists is because different language
323 tags may represent the same language; this is normally treatable with
324 \&\f(CW\*(C`same_language_tag\*(C'\fR, but consider this situation:
325 .Sp
326 You have a data file that expresses greetings in different languages.
327 Its format is "[language tag]=[how to say \*(AqHello\*(Aq]", like:
328 .Sp
329 .Vb 3
330 \& en\-US=Hiho
331 \& fr=Bonjour
332 \& i\-mingo=Hau\*(Aq
333 .Ve
334 .Sp
335 And suppose you write a program that reads that file and then runs as
336 a daemon, answering client requests that specify a language tag and
337 then expect the string that says how to greet in that language. So an
338 interaction looks like:
339 .Sp
340 .Vb 2
341 \& greeting\-client asks: fr
342 \& greeting\-server answers: Bonjour
343 .Ve
344 .Sp
345 So far so good. But suppose the way you\*(Aqre implementing this is:
346 .Sp
347 .Vb 9
348 \& my %greetings;
349 \& die unless open(IN, "<", "in.dat");
350 \& while(<IN>) {
351 \& chomp;
352 \& next unless /^([^=]+)=(.+)/s;
353 \& my($lang, $expr) = ($1, $2);
354 \& $greetings{$lang} = $expr;
355 \& }
356 \& close(IN);
357 .Ve
358 .Sp
359 at which point \f(CW%greetings\fR has the contents:
360 .Sp
361 .Vb 3
362 \& "en\-US" => "Hiho"
363 \& "fr" => "Bonjour"
364 \& "i\-mingo" => "Hau\*(Aq"
365 .Ve
366 .Sp
367 And suppose then that you answer client requests for language \f(CW$wanted\fR
368 by just looking up \f(CW$greetings\fR{$wanted}.
369 .Sp
370 If the client asks for "fr", that will look up successfully in
371 \&\f(CW%greetings\fR, to the value "Bonjour". And if the client asks for
372 "i\-mingo", that will look up successfully in \f(CW%greetings\fR, to the value
373 "Hau\*(Aq".
374 .Sp
375 But if the client asks for "i\-Mingo" or "x\-mingo", or "Fr", then the
376 lookup in \f(CW%greetings\fR fails. That\*(Aqs the Wrong Thing.
377 .Sp
378 You could instead do lookups on \f(CW$wanted\fR with:
379 .Sp
380 .Vb 8
381 \& use I18N::LangTags qw(same_language_tag);
382 \& my $response = \*(Aq\*(Aq;
383 \& foreach my $l2 (keys %greetings) {
384 \& if(same_language_tag($wanted, $l2)) {
385 \& $response = $greetings{$l2};
386 \& last;
387 \& }
388 \& }
389 .Ve
390 .Sp
391 But that\*(Aqs rather inefficient. A better way to do it is to start your
392 program with:
393 .Sp
394 .Vb 12
395 \& use I18N::LangTags qw(encode_language_tag);
396 \& my %greetings;
397 \& die unless open(IN, "<", "in.dat");
398 \& while(<IN>) {
399 \& chomp;
400 \& next unless /^([^=]+)=(.+)/s;
401 \& my($lang, $expr) = ($1, $2);
402 \& $greetings{
403 \& encode_language_tag($lang)
404 \& } = $expr;
405 \& }
406 \& close(IN);
407 .Ve
408 .Sp
409 and then just answer client requests for language \f(CW$wanted\fR by just
410 looking up
411 .Sp
412 .Vb 1
413 \& $greetings{encode_language_tag($wanted)}
414 .Ve
415 .Sp
416 And that does the Right Thing.
417 .IP \(bu 4
418 the function alternate_language_tags($lang1)
419 .Sp
420 This function, if given a language tag, returns all language tags that
421 are alternate forms of this language tag. (I.e., tags which refer to
422 the same language.) This is meant to handle legacy tags caused by
423 the minor changes in language tag standards over the years; and
424 the x\-/i\- alternation is also dealt with.
425 .Sp
426 Note that this function does \fInot\fR try to equate new (and never\-used,
427 and unusable)
428 ISO639\-2 three\-letter tags to old (and still in use) ISO639\-1
429 two\-letter equivalents \-\- like "ara" \-> "ar" \-\- because
430 "ara" has \fInever\fR been in use as an Internet language tag,
431 and RFC 3066 stipulates that it never should be, since a shorter
432 tag ("ar") exists.
433 .Sp
434 Examples:
435 .Sp
436 .Vb 10
437 \& alternate_language_tags(\*(Aqno\-bok\*(Aq) is (\*(Aqnb\*(Aq)
438 \& alternate_language_tags(\*(Aqnb\*(Aq) is (\*(Aqno\-bok\*(Aq)
439 \& alternate_language_tags(\*(Aqhe\*(Aq) is (\*(Aqiw\*(Aq)
440 \& alternate_language_tags(\*(Aqiw\*(Aq) is (\*(Aqhe\*(Aq)
441 \& alternate_language_tags(\*(Aqi\-hakka\*(Aq) is (\*(Aqzh\-hakka\*(Aq, \*(Aqx\-hakka\*(Aq)
442 \& alternate_language_tags(\*(Aqzh\-hakka\*(Aq) is (\*(Aqi\-hakka\*(Aq, \*(Aqx\-hakka\*(Aq)
443 \& alternate_language_tags(\*(Aqen\*(Aq) is ()
444 \& alternate_language_tags(\*(Aqx\-mingo\-tom\*(Aq) is (\*(Aqi\-mingo\-tom\*(Aq)
445 \& alternate_language_tags(\*(Aqx\-klikitat\*(Aq) is (\*(Aqi\-klikitat\*(Aq)
446 \& alternate_language_tags(\*(Aqi\-klikitat\*(Aq) is (\*(Aqx\-klikitat\*(Aq)
447 .Ve
448 .Sp
449 This function returns empty\-list if given anything other than a formally
450 valid language tag.
451 .IP \(bu 4
452 the function \f(CW@langs\fR = panic_languages(@accept_languages)
453 .Sp
454 This function takes a list of 0 or more language
455 tags that constitute a given user\*(Aqs Accept\-Language list, and
456 returns a list of tags for \fIother\fR (non\-super)
457 languages that are probably acceptable to the user, to be
458 used \fIif all else fails\fR.
459 .Sp
460 For example, if a user accepts only \*(Aqca\*(Aq (Catalan) and
461 \&\*(Aqes\*(Aq (Spanish), and the documents/interfaces you have
462 available are just in German, Italian, and Chinese, then
463 the user will most likely want the Italian one (and not
464 the Chinese or German one!), instead of getting
465 nothing. So \f(CW\*(C`panic_languages(\*(Aqca\*(Aq, \*(Aqes\*(Aq)\*(C'\fR returns
466 a list containing \*(Aqit\*(Aq (Italian).
467 .Sp
468 English (\*(Aqen\*(Aq) is \fIalways\fR in the return list, but
469 whether it\*(Aqs at the very end or not depends
470 on the input languages. This function works by consulting
471 an internal table that stipulates what common
472 languages are "close" to each other.
473 .Sp
474 A useful construct you might consider using is:
475 .Sp
476 .Vb 4
477 \& @fallbacks = super_languages(@accept_languages);
478 \& push @fallbacks, panic_languages(
479 \& @accept_languages, @fallbacks,
480 \& );
481 .Ve
482 .IP \(bu 4
483 the function implicate_supers( ...languages... )
484 .Sp
485 This takes a list of strings (which are presumed to be language\-tags;
486 strings that aren\*(Aqt, are ignored); and after each one, this function
487 inserts super\-ordinate forms that don\*(Aqt already appear in the list.
488 The original list, plus these insertions, is returned.
489 .Sp
490 In other words, it takes this:
491 .Sp
492 .Vb 1
493 \& pt\-br de\-DE en\-US fr pt\-br\-janeiro
494 .Ve
495 .Sp
496 and returns this:
497 .Sp
498 .Vb 1
499 \& pt\-br pt de\-DE de en\-US en fr pt\-br\-janeiro
500 .Ve
501 .Sp
502 This function is most useful in the idiom
503 .Sp
504 .Vb 1
505 \& implicate_supers( I18N::LangTags::Detect::detect() );
506 .Ve
507 .Sp
508 (See I18N::LangTags::Detect.)
509 .IP \(bu 4
510 the function implicate_supers_strictly( ...languages... )
511 .Sp
512 This works like \f(CW\*(C`implicate_supers\*(C'\fR except that the implicated
513 forms are added to the end of the return list.
514 .Sp
515 In other words, implicate_supers_strictly takes a list of strings
516 (which are presumed to be language\-tags; strings that aren\*(Aqt, are
517 ignored) and after the whole given list, it inserts the super\-ordinate forms
518 of all given tags, minus any tags that already appear in the input list.
519 .Sp
520 In other words, it takes this:
521 .Sp
522 .Vb 1
523 \& pt\-br de\-DE en\-US fr pt\-br\-janeiro
524 .Ve
525 .Sp
526 and returns this:
527 .Sp
528 .Vb 1
529 \& pt\-br de\-DE en\-US fr pt\-br\-janeiro pt de en
530 .Ve
531 .Sp
532 The reason this function has "_strictly" in its name is that when
533 you\*(Aqre processing an Accept\-Language list according to the RFCs, if
534 you interpret the RFCs quite strictly, then you would use
535 implicate_supers_strictly, but for normal use (i.e., common\-sense use,
536 as far as I\*(Aqm concerned) you\*(Aqd use implicate_supers.
537 .SH "ABOUT LOWERCASING"
538 .IX Header "ABOUT LOWERCASING"
539 I\*(Aqve considered making all the above functions that output language
540 tags return all those tags strictly in lowercase. Having all your
541 language tags in lowercase does make some things easier. But you
542 might as well just lowercase as you like, or call
543 \&\f(CWencode_language_tag($lang1)\fR where appropriate.
544 .SH "ABOUT UNICODE PLAINTEXT LANGUAGE TAGS"
545 .IX Header "ABOUT UNICODE PLAINTEXT LANGUAGE TAGS"
546 In some future version of I18N::LangTags, I plan to include support
547 for RFC2482\-style language tags \-\- which are basically just normal
548 language tags with their ASCII characters shifted into Plane 14.
549 .SH "SEE ALSO"
550 .IX Header "SEE ALSO"
551 * I18N::LangTags::List
552 .PP
553 * RFC 3066, \f(CW\*(C`<http://www.ietf.org/rfc/rfc3066.txt>\*(C'\fR, "Tags for the
554 Identification of Languages". (Obsoletes RFC 1766)
555 .PP
556 * RFC 2277, \f(CW\*(C`<http://www.ietf.org/rfc/rfc2277.txt>\*(C'\fR, "IETF Policy on
557 Character Sets and Languages".
558 .PP
559 * RFC 2231, \f(CW\*(C`<http://www.ietf.org/rfc/rfc2231.txt>\*(C'\fR, "MIME Parameter
560 Value and Encoded Word Extensions: Character Sets, Languages, and
561 Continuations".
562 .PP
563 * RFC 2482, \f(CW\*(C`<http://www.ietf.org/rfc/rfc2482.txt>\*(C'\fR,
564 "Language Tagging in Unicode Plain Text".
565 .PP
566 * Locale::Codes, in
567 \&\f(CW\*(C`<http://www.perl.com/CPAN/modules/by\-module/Locale/>\*(C'\fR
568 .PP
569 * ISO 639\-2, "Codes for the representation of names of languages",
570 including two\-letter and three\-letter codes,
571 \&\f(CW\*(C`<http://www.loc.gov/standards/iso639\-2/php/code_list.php>\*(C'\fR
572 .PP
573 * The IANA list of registered languages (hopefully up\-to\-date),
574 \&\f(CW\*(C`<http://www.iana.org/assignments/language\-tags>\*(C'\fR
575 .SH COPYRIGHT
576 .IX Header "COPYRIGHT"
577 Copyright (c) 1998+ Sean M. Burke. All rights reserved.
578 .PP
579 This library is free software; you can redistribute it and/or
580 modify it under the same terms as Perl itself.
581 .PP
582 The programs and documentation in this dist are distributed in
583 the hope that they will be useful, but without any warranty; without
584 even the implied warranty of merchantability or fitness for a
585 particular purpose.
586 .SH AUTHOR
587 .IX Header "AUTHOR"
588 Sean M. Burke \f(CW\*(C`[email protected]\*(C'\fR