]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
doc: Improve documentation of language identifier with variant.
authorBruno Haible <bruno@clisp.org>
Tue, 12 May 2026 14:20:40 +0000 (16:20 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 12 May 2026 14:20:40 +0000 (16:20 +0200)
Reported by <wuzzy@disroot.org> at <https://savannah.gnu.org/bugs/?68082>.

* gettext-tools/doc/gettext.texi (Header Entry): Document that ll@variant is
allowed as well, and give a few examples.

gettext-tools/doc/gettext.texi

index 50637393c767fabd4e65cafce9d4ee3b1c08eabb..48f0142d6339ca0cb6819ca385e907e2133b7fea 100644 (file)
@@ -3877,7 +3877,7 @@ area.
 Fill in the language code of the language.  This can be in one of three
 forms:
 
-@itemize -
+@itemize @bullet
 @item
 @samp{@var{ll}}, an @w{ISO 639} two-letter language code (lowercase).
 For some languages,
@@ -3895,13 +3895,26 @@ code serves to distinguish the dialects. See @ref{Language Codes} and
 @ref{Country Codes} for the lists of codes.
 
 @item
-@samp{@var{ll}_@var{CC}@@@var{variant}}, where @samp{@var{ll}} is an
-@w{ISO 639} two-letter
-or three-letter
-language code (lowercase), @samp{@var{CC}} is an
-@w{ISO 3166} two-letter country code (uppercase), and @samp{@var{variant}} is
-a variant designator. The variant designator (lowercase) can be a script
-designator, such as @samp{latin} or @samp{cyrillic}.
+@samp{@var{ll}@@@var{variant}} or @samp{@var{ll}_@var{CC}@@@var{variant}},
+where @samp{@var{ll}} is an
+@w{ISO 639} two-letter or three-letter language code (lowercase),
+@samp{@var{CC}} is an
+@w{ISO 3166} two-letter country code (uppercase),
+and @samp{@var{variant}} is a variant designator.
+The variant designator (lowercase) can be a script designator,
+such as @samp{latin} or @samp{cyrillic},
+or it can indicate a dialect.
+For example, the following language codes are in use:
+@itemize -
+@item
+@samp{be@@latin} and @samp{sr@@latin} for Belarusian and Serbian,
+written in Latin script.
+@item
+@samp{uz@@cyrillic} for Uzbek, written in Cyrillic script.
+@item
+@samp{ca@@valencia} for Catalan, as spoken in the region around Valencia
+(the southern Catalan dialect).
+@end itemize
 @end itemize
 
 The naming convention @samp{@var{ll}_@var{CC}} is also the way locales are