[bt-devel] Localisation

Troy A. Griffitts bt-devel@crosswire.org
Tue, 14 Mar 2000 12:56:30 -0700


Torsten and all,
	You merely have to include 2 lines:

	#include <localemgr.h>
	...
	LocaleMgr::systemLocaleMgr.setDefaultLocaleName("de");	// or whatever
locale




These lines should be before any sword objects are created.



Torsten Uhlmann wrote:
> 
> Joachim Ansorg wrote:
> >
> > Hi!
> >
> > Perhaps you noticed that Troy integrated localisation into SWORD!
> >
> > What do you think is the best way to integrate this cool feature in BibleTime ?
> >
> > I think we should use the language of KDE to set the language of SWORD, perhaps
> > a switch to switch this behaviou on or off. If it's off the user can enter his
> > own locale setting.
> >
> > I think we should put a new function setLocale in CBackend, shouldn't we ?
> > Torsten, I know you are busy with work, if you agree I'll integrate this in
> > CBackend.
> >
> > Have other things to be done in CBackend (du to the localisation changes) ?
> >
> > THANKS!
> 
> Sure you can!
> But how is it implemented? I didn't look at the code yet. In other
> words, is there a function, the key must go thru in order to be
> translated or is this done transparently hidden for the frontend? In
> this case I guess we only need to set the language. In the other case we
> need to integrate that translation function before we give the key to
> the sword module.
> 
> We probably should design cbackend a bit as a container for options and
> give a reference (or pointer) to it to each module. So the modules can
> get language info, color info etc. from cbackend and don't need to
> access the config files themselves. Could speed the process up a little
> bit. And cbackend would serialize the info from the modules and write to
> the config file what's appropriate. Just a thought...
> 
> To see you at work is encouraging!
> 
> >
> > -- Joachim
> > BibleTime - the bible study program for KDE
> > http://www.bibletime.de/
> > info@bibletime.de
> 
> --
> 
> best regards,
> Torsten Uhlmann
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> TUhlmann@gmx.de
> TUhlmann@debis.com
> 
> http://www.tuhlmann.purespace.de
> http://www.bibletime.de
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Wise men still seek him.