Make WordPress Core

Opened 16 years ago

Closed 10 years ago

Last modified 2 months ago

#7837 closed defect (bug) (fixed)

Localization of numbers should be supported

Reported by: huji's profile huji Owned by:
Milestone: 2.8 Priority: low
Severity: minor Version:
Component: I18N Keywords:
Focuses: Cc:

Description

I'm new to WordPress so please bear with me: I believe localization of numbers should be added to WordPress features. This means that, if you install WordPress and use (for example) Arabic language packs, numbers should be shown using Arabic digits, not English digits.

Change History (17)

#1 @jacobsantos
16 years ago

Arabic digits = English digits.

Arabic digits are already internationalized.

#2 @jacobsantos
16 years ago

However, you are correct that different languages do use also different characters for numbers.

#3 @huji
16 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.

#4 @jacobsantos
16 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.

#5 @DD32
16 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.

#6 @jacobsantos
16 years ago

DD32,

I think he was talking about the themes and, or the blogger that is supported by the unicode language in MySQL.

#7 @huji
16 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.

#8 @Nicholas91
16 years ago

  • Keywords needs-patch added

#9 @Denis-de-Bernardy
16 years ago

  • Milestone changed from 2.8 to Future Release

#11 @Denis-de-Bernardy
16 years ago

  • Priority changed from normal to low
  • Severity changed from normal to minor

#12 @Denis-de-Bernardy
16 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.

#13 @Denis-de-Bernardy
16 years ago

  • Milestone changed from Future Release to 2.9

#14 @ryan
15 years ago

  • Milestone changed from 2.9 to Future Release

#15 @chriscct7
10 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

This was resolved with the introduction of number_format_i18n as a part of #7753

#16 @DrewAPicture
10 years ago

  • Keywords needs-patch removed
  • Milestone changed from Future Release to 2.8
  • Resolution changed from duplicate to fixed

This was made possible in [11407] with the introduction of the number_format_i18n filter.

#17 @im3dabasia1
2 months ago

#62614 was marked as a duplicate.

Note: See TracTickets for help on using tickets.