Re: [greenstone-users] Format question and little bugs? dc.Language not showing up

From Katherine Don
DateFri, 10 Mar 2006 11:39:50 +1300
Subject Re: [greenstone-users] Format question and little bugs? dc.Language not showing up
In-Reply-To (440FEFA7-3020100-inwind-it)
Hi Ruben

I have realised what your problem is. Its actually based on a "feature"
of greenstone, not a bug :-)

Greenstone expects Language metadata to be ISO two letter codes, en, fr,
es etc. And when its displaying them, it (un)helpfully maps them to a
proper name. eg en will become English.
This list is hard coded in the source code (you can see it in
src/recpt/formattools.cpp, text_t iso639 (const text_t &langcode) ).
Unfortunately, it doesn't recognise three letter codes.

For your case, you have two options. Change your Language metadata to be
two letter codes (and English, French etc will be displayed), or change
the element name to be something other than Language (and eng, fre, etc
will be displayed).

Or you could change the source code :-)

Regards,
Katherine


ruben pandolfi wrote:
> Thank you Katherine,
>
> Katherine Don wrote:
>
>> Hi Ruben
>>
>> Actually, for the first one, try putting the language line before the
>> Contributor line - does this make any difference? I wonder if the
>> sibling bits in the Contributor are stuffing things up?
>
>
> I have tried putting the line everywhere but it is not showing up. (no
> bugs then for the sibling exp )
>
>>> You could check your database to make sure that dc.Language is being
>>> stored.
>>> in the greenstone directory, run
>>> source setup.bash
>>> db2txt collect/babel3/index/text/babel3.ldb | less
>>> and search for dc.Language
>
>
>
> db2txt collect/babel3/index/text/babel3.ldb | less output looks ok, e.g. :
>
>
> [HASH015cd9bf003c51347cd223f5]
> <doctype>doc
> <hastxt>1
> <Plugin>NULPlug
> <Source>0209.nul
> <FileSize>0
> <null_file>0209.nul
> <dc.Publisher>Mille et une nuits
> <dc.Language>fre
> <dc.extension.place>Paris
> <dc.Type>monographie
> <dc.Date>1997
> <dc.Title>Plan□te : l'aventure inconnue
> <dc.Contributor>Morin, Edgar
> <dc.Contributor>Wulf, Christoph
> <dc.Identifier>2842051319
> <dc.recordInfo>IMP
> <Title>0209
> <assocfilepath>HASH015c.dir
> <archivedir>HASH015c.dir
> <thistype>Paged
> <docnum>209
>
>
> I have tried remouving the IF
>
> {If}{[dc.Language],
>
>
> it does print the meta label but still no values.
>
> What is really funny is that there are values, and they are correctly
> displayed in the classifier:
>
> classify GenericList -metadata dc.Language
> -always_bookshelf_last_level -sort_leaf_nodes_using dc.Title
>
>
> http://www02.unibg.it/~morin/gsdl/cgi-bin/library?e=d-000-00---0babel3--00-1-0--0prompt-10-DC%2cDO%2cDN%2cDE--4--%2c%2c%2c----0-1l--1-it-50---20-preferences---00131-001-1-0utfZz-8-00&a=d&cl=CL4
>
>
> open this section of the library and view contents cas
> open this section of the library and view contents den
> open this section of the library and view contents eng
> open this section of the library and view contents fre
> open this section of the library and view contents ger
> open this section of the library and view contents ita
> open this section of the library and view contents langue non
> pr□cis□e
> open this section of the library and view contents por
> open this section of the library and view contents spa
> open this section of the library and view contents tur
>
>
>
>
> Might it be the value "langue non pr□cis□e" causing problems?
>
> Any other idea?
>
> Thanks!
>
> Ruben
>
>