[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnumed-devel] i18n.sql
From: |
Ian Haywood |
Subject: |
[Gnumed-devel] i18n.sql |
Date: |
Sat, 7 Dec 2002 13:14:22 +1100 (AEDT) |
i18n.sql is checked in, as an example of how we could internationalise
under SQL. This defines a function _ (text) returning text.
The sequence for installation scripts is:
1/ gnumed.sql -- to install procedural languages plpgsql and
plpython. (currently only plpgsql is used, plpython probably will be in
the near future though)
2/ i18n.sql
3/ translation tables (dumps of i18n_strings and i18n_trans)
4/ select language like so: insert into lang values ('de');
5/ run main script(s) (gmclinical, gmidentity, etc.)
_ () will check the table i18n_trans, filled in step 3, returning the
translation for that language. If not available, it returns the original
string, and inserts it into i18n_strings.
So running the script the first time will provide you with a table
i18n_strings to show the translator.
I have added _ () to the gmclinical.sql strings as an example.
So in i18n_strings we find and entry, say:
14 doctor
To load the German translation, at step 3 we would have:
insert into i18n_trans values ('de', 14, 'Arzt');
Now _ ('doctor') will return 'Arzt' when the main script is run.
NOTE: to avoid pain and suffering later on, English should be considered
at least two languages: en_US and en_UK. Will we need separate German,
Swiss, Austrian translations?
P.S. The drug reference is online at the interim
location of http://gnumed.bpa.nu:8080/ please check it out.
Your browsers may give you some nonsense about certificates: just click
OK.
Ian
Re: [Gnumed-devel] i18n.sql, Karsten Hilbert, 2002/12/22