[Haskell-cafe] [OT] Yet Another program written in Haskell: a
language tag parser
bortzmeyer at nic.fr
Wed Sep 20 03:34:11 EDT 2006
The program is written in Haskell, hence my shameless ad here:
GaBuZoMeu is a set of programs to parse and check language tags (see
the RFC 4646 produced by the IETF Working Group LTRU - Language Tag
Language tags are used by several protocols (like HTTP) or languages
(like XML) to indicate the human language you want or have. Examples
of language tags are "fr" (French), "apa" (Apache), "se-FI" (Swedish,
as practiced in Finland) or "uk-Latn" (ukrainian in the latin script).
An IANA registry stores the registered values
A language tag can be well-formed (syntactically correct) or not. This
can be tested without access to the registry. A langauge tag can be
valid or not (all its subtags registered). This depends on the copy of
the registry you use (since the registry changes).
GaBuZoMeu includes the following programs:
* check-wf checks the well-formedness of tag(s). Example of use:
"check-wf fr en-AU".
* check-valid checks the validity of tag(s). Same use.
GaBuZoMeu is written in Haskell (http://www.haskell.org/) so you'll
need an Haskell compiler such as ghc (http://haskell.org/ghc/).
To compile, just type "make". To check that everything is OK, you can
type "make test". You should get zero "Errors" and zero "Failures".
GaBuZoMeu is distributed as free software, under the GNU General
Public Licence. Remarks, patches and bug reports are welcome.
Written and maintained by Stephane Bortzmeyer <bortzmeyer at nic.fr>.
More information about the Haskell-Cafe