Bug 188646 - Use per-language settings for formatting of numbers
Summary: Use per-language settings for formatting of numbers
Status: CONFIRMED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: klocale (show other bugs)
Version: 4.2
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Chusslove Illich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-02 11:17 UTC by Eckhart Wörner
Modified: 2010-01-13 09:57 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eckhart Wörner 2009-04-02 11:17:21 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

Steps to reproduce:
- In KDE region settings, set the number formatting to some individual values (e.g. set thousands separator to "XXX")
- call i18np() with a number i
Expected result:
- i is formatted with the KDE-specific settings
Actual result:
- i is formatted according to some language defaults
Comment 1 Chusslove Illich 2009-04-02 11:39:04 UTC
This is not a bug. There are ortography rules how numbers are written in English, how in German, etc. What would be the rationale for having e.g. a German sentence with English number formatting?

If there is a rationale, however, it's must be highly culture/language/user dependent. KDE translators into a given language can already select to let locale settings override proper number ortography for that language. If that is not enough (in case there is high random-user dependency), then an option like "Override language ortography for numbers" should be added to locale control module.
Comment 2 Eckhart Wörner 2009-04-02 13:21:37 UTC
Actual problem (as described on irc):
One should be able to set formatting rules per-language. Each translation should then use the configuration for its language (or default rules for the language if no rules are set).
Comment 3 Chusslove Illich 2009-04-02 13:43:24 UTC
I agree that solution in comment #2 would be the cleanest: not changing the current behavior for the most frequent case, allowing tuning as necessary and in a logical way, and removing some non-simmetricity when several languages interact.
Comment 4 Juan 2009-04-21 01:21:29 UTC
This IS a bug. 
And here is an example:
I am currently in Germany. My keyboard layout is in German, I am in Berlin's time zone, use euro as currency, 24 h clock and dd/mm/yyyy date format. This info is what constitutes the "locale" settings. I like my OS in English because, well, I just like it/need it. 
If I set the locale settings to Germany and the language to English (USA), all the programs will ignore my setting and stubbornly show me a date with the mm/dd/yyyy format common in the USA.    

This defeats the purpose of asking (on the installation of i.e.kubuntu) the time (region) setting and the desired language. The language (and settings) could be imposed by the targeted region (much like windows).
Comment 5 Chusslove Illich 2009-05-04 22:37:58 UTC
Progress update.

To implement this properly is technically harder than I thought, even if conceptually clear in most details. So, temporarily I'm discontinuing non user configurable language sensitivity for KDE 4.2 and 4.3, instead following locale settings regardless of language, as is usual in other environments.

I hope a thorough language-sensitivity solution will be ready by KDE 4.4.
Comment 6 Denis Dzyubenko 2010-01-13 09:57:59 UTC
I see that KLocale already has a function KLocale::setMainCatalog and KLocale can be constructed with a gived catalog name. Does that mean that this bugreport is no longer valid since the catalog name (i.e. the UI language, as far as I understand it) can be set separately from the numbering formatting options.