gnumed-devel
[Top][All Lists]
Advanced

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

[Gnumed-devel] database language auto-config


From: Karsten Hilbert
Subject: [Gnumed-devel] database language auto-config
Date: Wed, 5 Feb 2003 13:27:25 +0100
User-agent: Mutt/1.3.22.1i

Upon startup the client now auto-configures the language used
in the database (gmGuiMain.__set_db_lang()).

The following things influence the decision:

The language is taken from the system locale in the environment
variables checked for the GUI language by gmI18N.py.

If there's no i18n_curr_lang table in the database the client
assumes that no translations are wanted and tries to work
without it. Same if other errors prevent normal operations - a
warning is logged and things continue.

If the language given in the database doesn't match the system
locale the user is asked whether to update the database setting
to that. You can influence the system locale setting in
per-instance wrapper scripts if so desired.

The database language setting is only updated if translations
are actually available for the target language. Two levels of
truncation of the system locale are used to find matching
translations:

1) full locale: 'address@hidden'
2) no dialect:  'de_DE'
3) no country:  'de'

This allows for a missing Austrian translation to fall back to
a general German (de_AT -> de) one, for example.

The code is all in place. For some strange reason it seems to
not work although I cannot find the problem.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

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