Problem/Motivation

I am using the formatter for formatting integers to Ordinal numbers. The module works really well for English (en) converting 1 to 1st, 2 to 2nd, and so on.

However, for other lanugages like Arabic with locale 'ar' it is not converting accurately. The symbol seems to be missing and instead we get a '.'. The same happens for run

Steps to reproduce

Noticed the problem only in a multilingual site.

1. Create a field in a content type of type number(integer)
2. Add the number formatted as formatter and set it to current language.
3. Create a node of said content type and add a value to the field.
4. Save
5. Now add a translation of the content in a language like Arabic or Russian and check the display in that language.

I added debugging statements.

 $numberFormatter = new IntlNumberFormatter($language, $this->settings['style']);
    dump($numberFormatter);

and I get the output as below.

^ NumberFormatter {#2773 ▼
  locale: "ar"
  pattern: """
    %digits-ordinal:


    0: =#,##0=.;


    -x: −>%digits-ordinal>;


    """
  attributes: {▶}
  text_attributes: {▶}
  symbols: {▶}
  error_code: 16
  error_message: "Error getting symbol value: U_UNSUPPORTED_ERROR"
}

^ array:1 [▼

Proposed resolution

None at the moment. This might be a PHP core bug.

Remaining tasks

User interface changes

Comments

binnythomas created an issue. See original summary.

binnythomas’s picture

Version: 8.x-1.0 » 8.x-1.1