Bug Report T702864
Visible to All Users

NumberBox - Format doesn't work if the "fa" culture is used

created 6 years ago (modified 6 years ago)

Hi,
I'm trying to localize devextreme number box and text box to Persian Locale.
I successfully have added Globalize + cldr to the angular app.
I'm using the following code for initializing localization:

JavaScript
import {Component} from '@angular/core'; import Globalize from 'globalize'; import 'devextreme/localization/globalize/number'; import 'devextreme/localization/globalize/date'; import 'devextreme/localization/globalize/currency'; import 'devextreme/localization/globalize/message'; import faCldrData from 'devextreme-cldr-data/fa.json'; import supplementalCldrData from 'devextreme-cldr-data/supplemental.json'; import config from 'devextreme/core/config'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { constructor() { Globalize.load(supplementalCldrData, faCldrData); Globalize.locale('fa'); config({ defaultCurrency: 'IRR' }); } }

and the app.component.html is like:

HTML
<dx-number-box format="currency"></dx-number-box>

so, when I run the application, there is a Number Box in the output with this strange initial value: "ریال ۱۱۱٬۱۱۰". Also the Number Box is read only and can not be edited. The Minus sign also is not working.

Note: "ریال " is Iranian currency symbol and '۱۱۱٬۱۱۰' is equal to '111,110'
------------------------
PS:
I've changed the html template to this:

HTML
<dx-number-box format="#,##0.##"></dx-number-box>

Now the Number Box is working and I can edit the content, but the Minus sign is still not working.
Project Files has been attached.

Comments (2)
Artem (DevExpress Support) 6 years ago

    Hi,

    Thank you for the example. I see the issue and we need more time to research it. Please bear with us.
    Would you mind if we make this thread public to inform other users about this issue?

      Hi,
      First of all, merry Christmas!

      Thanks for replay, it is ok to make this thread public.

      Answers approved by DevExpress Support

      created 6 years ago

      We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

      Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

      Additional information:

      Hello.

      We have fixed the incorrect behavior with the minus sign and the incorrect initial value rendering. If you want to use rtl localization, please set the rtlEnabled option to true on the editor or application level.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.