Localizing number validation

About this task

By default, Java™ displays the localized number format based on what is specified for <language>_<country> in the Applications Manager. For the Sterling Selling and Fulfillment Foundation UI to validate numeric values, the application must read the values as specified in the Validation_<language>_<country>.js file. This means that the validation JavaScript file must contain validation logic that is specific to the number format to be used for the validation for each locale.

To localize number validation:

Procedure

  1. Save the <INSTALL_DIR>/repository/eardata/platform/war/yfcscripts/Validation.js file as Validation_<language>_<country>.js (with all translations in escaped Unicode format).
  2. Change the decimal separator and grouping separator, as required. The grouping separator indicates how to format numbers visually; it has no impact on the actual value of the number.

    For example, en_US uses a comma (",") and fr_FR uses a non-breaking space (" "). When specifying the separator, use the Unicode literal.

    For example, the non-breaking character for fr_FR will be specified as shown below:

       yfcGroupingSeparator = "\u00a0";
       
  3. Localize the exception messages for invalid number format as described in Literals.
  4. Run the resource deployer from ./deployer.sh -l info -t resourcejar.
  5. If you are using Oracle WebLogic or IBM® WebSphere®, rebuild the EAR.