Results 1 to 9 of 9

Thread: How to customize time and date formt beyond the option the various locales provide?

  1. #1

    Default How to customize time and date formt beyond the option the various locales provide?

    Dear community,

    I have recently switched from 12.3 to 42.3. While in the old system it was possible to customize the KDE digital clock widget by itself in detail (define formats for date and time), the new system just allows me to choose from a load of preinstalled locales. Large as this load is, it doesn’t really satisfy my wishes.

    I am a German speaker, but I want my computer to talk English to me without following the various absurdities of time and date format often found in English speaking countries. So I want 24 hour clock, short date as “10.09.2017”, long date as “Sun 10 Sep 2017” but plain numbers with a simple decimal point and not crappy commata. The wbp_AU locale comes close, but still isn’t the right thing. For example, the long date format “Sunday, September 10, 2017” takes up insanely much space in the panel, although most letters are redundant. Moreover, I fear that in some situations a mixed endian date 10/9/17 might show up which will endlessly confuse me if it happens.

    Now, locale files are not human-readable and cannot easily hacked to to what I want — besides, I can’t even find a file containing *wbp_AU* on my disk.

    What are the options? Are there any programs available from openSUSE (or from somewhere else) that allow to create a new locale, or review and modify an existing one? I do value configurability and so I am willing to take some (moderate) pain to solve the issue.

    I noticed that a similar question was asked recently in https://forums.opensuse.org/showthre...o-I-set-locale however I don’t think it parallels my case. Also, I cannot find a locale en_DE.


    Any input is welcome.

    Gernot Katzer

  2. #2
    Join Date
    Sep 2013
    Location
    Norfolk, UK
    Posts
    1,265

    Default Re: How to customize time and date formt beyond the option the various locales provide?

    In the thread you linked to, my posts #55 and #59 may give you some ideas.

    The short answer is there's no easy way to customise locales at the moment.

    Apologies for the short reply, just about to go out.

    I'm sure others will contribute.
    Regards, Paul

    2x Tumbleweed (Snapshot: 20191014) KDE Plasma 5
    2x Leap 15.1 KDE Plasma 5

  3. #3

    Default Re: How to customize time and date formt beyond the option the various locales provide?

    ...to set locale is far to be perfect and a common problem that one day or other I will solve
    ...for your issue could be a good idea to change in german only the things that you like in systemsettings>regional settings>formats tab>check detailed settings and change what you like in the numbers time or other

  4. #4
    Join Date
    Jun 2008
    Location
    West Yorkshire, UK
    Posts
    3,450

    Default Re: How to customize time and date formt beyond the option the various locales provide?

    Language and locale are quite different; you can set the system language as English and the locale as German; I do that every year when I visit my frsiends in Germany.

    Date formats however tend to be application dependent. Most of the English date formats I can see have - as the alternative divider, eg. 10-09-2017, but LibreOffice, for example, has several different shortformat dates to select from.

    KDE System settings>Regional settings>Formats allows some customisation of Numeric, Currency and Time formats for KDE applications. You may have to search a bit but you may find that a detailed setting other than an English or German one allows you to fine tune the display for KDE applications.

  5. #5
    Join Date
    Sep 2013
    Location
    Norfolk, UK
    Posts
    1,265

    Default Re: How to customize time and date formt beyond the option the various locales provide?

    Quote Originally Posted by masala_wallah View Post
    Now, locale files are not human-readable and cannot easily hacked to to what I want — besides, I can’t even find a file containing *wbp_AU* on my disk.

    What are the options? Are there any programs available from openSUSE (or from somewhere else) that allow to create a new locale, or review and modify an existing one? I do value configurability and so I am willing to take some (moderate) pain to solve the issue.
    Unfortunately I think you'll have to accept a compromise solution...

    KDE uses Qt, at the moment Qt's locale support (on linux) uses it's own embedded CLDR data and not that provided by glibc.

    No matter if new, or modified (glibc) locale definitions are added to /usr/lib/locale/, it makes no difference to Qt. As I found out for myself recently after modifying en_GB LC_TIME, a non Qt application, GIMP's file chooser for example, recognised the new format, KDE applications did not.

    As you've found, and "john_hudson" mention in the post above, you have limited customisation via (KDE) "System Settings - Regional Settings - Formats".

    By enabling "Detailed Settings" you *might* find a combination of Numbers and Time that come close to your requirements. Unfortunately 42.3 still uses Qt 5.6.2 which has far fewer locale definitions than Qt 5.9.1 of Tumbleweed, but even that is still limited in terms of customisation options.

    The problem is acknowledged by Qt developers https://wiki.qt.io/Locale_Support_in_Qt_5
    A major issue that needs solving is user customizations on UNIX desktop platforms. This is of particular interest to KDE developers.
    There is a long standing (KDE) bug report concerning lack of locale customisation:
    https://bugs.kde.org/show_bug.cgi?id=340982

    I think we are a way off a satisfactory solution yet
    Regards, Paul

    2x Tumbleweed (Snapshot: 20191014) KDE Plasma 5
    2x Leap 15.1 KDE Plasma 5

  6. #6

    Default Re: How to customize time and date formt beyond the option the various locales provide?

    ...and where does dolphin take the date???

  7. #7
    Join Date
    Sep 2013
    Location
    Norfolk, UK
    Posts
    1,265

    Default Re: How to customize time and date formt beyond the option the various locales provide?

    Quote Originally Posted by pier_andreit View Post
    ...and where does dolphin take the date???
    If you mean the date format, and assuming you are referring to the plasma5 version. It uses the routines and locale data provided by Qt.
    Regards, Paul

    2x Tumbleweed (Snapshot: 20191014) KDE Plasma 5
    2x Leap 15.1 KDE Plasma 5

  8. #8

    Default Re: How to customize time and date formt beyond the option the various locales provide?

    Quote Originally Posted by tannington View Post
    If you mean the date format, and assuming you are referring to the plasma5 version. It uses the routines and locale data provided by Qt.
    yes , sorry for the short explanation of my meanings. ...I tried en_DK in systemsettings>regional settings>formats>region and only changed currency in italian, now I have iso date format in clock and in dolphin. manythanks very good!!

  9. #9
    Join Date
    Aug 2010
    Location
    Athens, Greece
    Posts
    11

    Default Re: How to customize time and date formt beyond the option the various locales provide?

    Quote Originally Posted by pier_andreit View Post
    ...I tried en_DK in systemsettings>regional settings>formats>region and only changed currency in italian, now I have iso date format in clock and in dolphin.
    That's strange because with en_DK I get dd/mm/yyyy.

    And there is a qt bug reported here:
    https://bugreports.qt.io/browse/QTBUG-59382

    Furthermore, according to unicode.org, en_DK should use short year like 17-11-30.
    So how on earth do you get ISO dates?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •