-rw-r--r-- | kaddressbook/mainembedded.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index d781f67..4230c07 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp @@ -73,2 +73,17 @@ int main( int argc, char **argv ) + { + KConfig kon ( locateLocal( "config", "korganizerrc" ) ); + kon.setGroup("Locale"); + KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)kon.readNumEntry( "PreferredDate",0) ); + QString dummy = kon.readEntry( "UserDateFormatShort","%aK %d.%m.%y" );// kon.readEntry( ""); + KGlobal::locale()->setHore24Format( !kon.readBoolEntry( "PreferredTime",0 ) ); + KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); + dummy = kon.readEntry( "UserDateFormatLong","%A %d %b %y" ); + KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); + kon.setGroup("Time & Date"); + KGlobal::locale()->setDaylightSaving( kon.readBoolEntry( "UseDaylightsaving", true ), + kon.readNumEntry( "DaylightsavingStart", 90), + kon.readNumEntry( "DaylightsavingEnd",304) ); + KGlobal::locale()->setTimezone( kon.readEntry( "TimeZoneName" ," 00:00 Europe/London(UTC)") ); + } #ifndef DESKTOP_VERSION |