[liblouis-liblouisxml] Re: Grouping tables according to language and Braille code

  • From: Christian Egli <christian.egli@xxxxxx>
  • To: "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx>
  • Date: Thu, 02 Aug 2012 15:33:54 +0200

Hi all

"John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx> writes:

> For BrailleBlaster we are planing to give users a choice first of 
> supported languages and then of the Braille codes for each language. 
> Something like this has already been discussed on this list. Perhaps 
> there could be a file in the tables directory with two columns, the 
> first for a human-readable table name and the second for the actual name 
> of the table file.

There are a number of issues here. First there is some kind of look-up
from ISO 639 language code[1], grade, etc to an actual liblouis table
name. Second there is a nice human readable version of this meta data,
i.e. "English UK grade 2" for {en-UK, 2}. These two issues need to be
treated separately and can be handled independently.

For the DAISY Pipeline we need a mapping between ISO language code,
grade and number of dots, i.e. given a ISO language code, a grade and
the number of dots I would like to know a liblouis table name.
Apparently grade has different meaning for different languages, e.g. in
German both grade 1 and 2 are contracted and grade 0 is not, so I
wouldn't bother with some kind of information whether a table is
contracted or not. Usually a user will know if a particular grade is
contracted or not for her language.

This mapping could for example look like this:

en-US, 2, 6, en-us-g2.ctb
de, 1, 6, de-de-g1.ctb
de-CH, 1, 6, de-ch-g1.ctb

Maybe we need another column for computer braille, i.e. whether a table
is for computer braille.

In order for this to be usable from the DAISY Pipeline we need some kind
of API which given language code, grade and dots gives us the name of a
table. It would be nice to put this meta data into the table itself but
is not crucial. We could also just have a static array in a header file
which contains the mapping. This mapping can then be rebuilt at build
time.

The translation is a separate issue and should probably looked at once
we have the mapping in place. As far as I know gettext works by mapping
a string to another, but we are not strictly dealing with strings here,
so I don't know how we can translate from a tuple ("en-UK", 2, 6) to
"English UK grade 2 using6 dots".

Thanks
Christian

Footnotes: 
[1]  http://en.wikipedia.org/wiki/ISO_639 but I would prefer if we used
     the IETF language tag
     (http://en.wikipedia.org/wiki/IETF_language_tag) 
-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland
For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: