gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] one further aspect of i18n()ing


From: Ian Haywood
Subject: Re: [Gnumed-devel] one further aspect of i18n()ing
Date: Thu, 5 Dec 2002 18:37:15 -0500
User-agent: Mutt/1.3.28i

On Fri, Dec 06, 2002 at 12:15:05AM +0100, Karsten Hilbert wrote:
> Hi all,
> 
> results of queries will need to be wrapped in _() judiciously.
> E.g. when I am querying for the name of a relation I would
> force translation of the result and display the resulting
> string.
> 
> Please comment on this scheme !
Why does this have to occur at runtime?

It would be reasonably easy to write a SQL function gettext (), so
the insert statements become 

insert into relationship_types values (gettext ('father'));

gettext looks up a translation table to return 'Vater' for
this table, so the strings are only translated once: at database
installation. This means language localisation is at the database level,
but this has to happen anyway (as clinical notes will be in the
vernacular)

If gettext cannot find a translation in the tables, it enters the raw
string into the translation table , so importing the database the first
time gives us a table of strings to show the translators.

Ian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]