Skip to main content

Search

Localization problems

Comments

3 comments

  • ArdeviaForum

    Original Post by Andrii Katsiubka (Imported from Ardevia Forum)

    Hi,

    There are few ways how to resolve your problem.


    Solution 1: Replacing dot by comma

    • Open Expression builder for Calculated expression
    • Set expression type to "Function code"
    • Modify your expression logic as follow:
    • Code:
    var result = <Your Calculation logic>;
        return result.toString().replace(/\./g, ',');
    
    • Do not forget replace <Your Calculating logic> by your expression

    Solution 2: Use localization option

    • Open Expression builder for Calculated expression
    • Set expression type to "Function code"
    • Modify your expression logic as follow:
    • Code:
    var result = <Your Calculation logic>;
      return result.toLocaleString("<Language indentifier>");
    
    • Do not forget replace <Your Calculating logic> by your expression, and <Language indentifier> by Language indentifier what you need (eg. "en-US", "de-DE", "uk-UA")
    0
  • ArdeviaForum

    Original Post by Petri Puoli-Honka (Imported from Ardevia Forum)

    Hi,

     

    Thanks for your help.
    But doesn't these two methods require the input to be with a dot in the numbers when i input them in the fields.
    Is there a way to change the locale for all the number fields in the form? I have many fields that require the user to input numbers, so it would be nice if they all behaved the same way, not only the sum field with the automatic calculation.

     

    With this solution it seems like I have to make my inputs with a dot and the result would be with a colon.

     

    - Petri

    0
  • ArdeviaForum

    Original Post by Petri Puoli-Honka (Imported from Ardevia Forum)

    Is there any solution to this problem?
    Unfortunately this issue renders the forms unusable for my application.

    0

Please sign in to leave a comment.