Opened 5 years ago
Last modified 4 years ago
#7837 new defect (bug)
Localization of numbers should be supported
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | low | Milestone: | Future Release |
| Component: | I18N | Version: | |
| Severity: | minor | Keywords: | needs-patch |
| Cc: |
Change History (14)
comment:1
jacobsantos
— 5 years ago
comment:2
jacobsantos
— 5 years ago
However, you are correct that different languages do use also different characters for numbers.
comment:3
huji
— 5 years ago
Let me make myself clear: This internationalization should be global. I have installed WordPress and added Persian language pack; digits in the blog posts and post dates are converted correctly, but digits in the administration pages are still Roman.
comment:4
jacobsantos
— 5 years ago
I think the problem with it is that, it would add additional overhead for each number. There are quite a few times where numbers are passed to localized strings expecting to still be Roman. I'm not sure this is something that could be implemented easily.
What you ask for has repercussions for how WordPress currently handles numbers and how it will handle numbers in the future. The current framework probably would need to be extended or replaced.
It will help if a patch were available. I am most likely wrong, since I don't specialize in i18n, all of my sites are in (American) English.
comment:5
DD32
— 5 years ago
There is number_format_i18n(); however that only handles locale's having different decimal points and thousand seperators
I wasnt aware that front-end numbers are translated.. If they are, then i dont really see any reason why backend numbers couldnt get the same treatment.
comment:6
jacobsantos
— 5 years ago
DD32,
I think he was talking about the themes and, or the blogger that is supported by the unicode language in MySQL.
comment:7
huji
— 5 years ago
I haven't reviewed WordPress code totally, but from what I've seen so far, there is no native way used for conversion of numbers by default. For example, Persian language pack uses its own functions to convert numbers, decimal points, etc. (Find it in wp-jalali plugin files).
I have to disagree with the issue about overhead (or caching even). When correctly programmed, i18n of numbers wouldn't be such a problem. A seriously bigger project, "MediaWiki", is using this feature from long before without any difficulties.
comment:8
Nicholas91
— 4 years ago
- Keywords needs-patch added
comment:9
Denis-de-Bernardy
— 4 years ago
- Milestone changed from 2.8 to Future Release
comment:10
Denis-de-Bernardy
— 4 years ago
Related: #7753
See in particular: http://core.trac.wordpress.org/ticket/7753#comment:13
comment:11
Denis-de-Bernardy
— 4 years ago
- Priority changed from normal to low
- Severity changed from normal to minor
comment:12
Denis-de-Bernardy
— 4 years ago
Also this patch:
http://core.trac.wordpress.org/attachment/ticket/7753/7753.2.diff
But what's really needed to make it work is an overhaul of the workflow. Imo, both of the tickets should get closed as wontfix.
comment:13
Denis-de-Bernardy
— 4 years ago
- Milestone changed from Future Release to 2.9
comment:14
ryan
— 4 years ago
- Milestone changed from 2.9 to Future Release
Arabic digits = English digits.
Arabic digits are already internationalized.