|
<< Click to Display Table of Contents >> Manual > Screen Creation Guide > Internationalization (Browser) > Locale > Locale and Number Formatting |
Relationship between locale and number format
By setting the number format, you can display and input numbers in a way that is appropriate for your locale.
A number format is a format specification for specifying the format for displaying numbers, such as the decimal point, delimiter, radix, etc. Examples of situations in which you might specify a number format include specifying the format for a "Number Display Part" in the parts library, or the number format passed to a method for displaying numbers, such as CNumToLocale (NL).
FA-Panel allows you to flexibly set the number format. In addition to displaying numbers in various formats around the world, you can also set your own format.
Number formats refer to the specified locale to obtain the number format.
For example, if you specify the system's pre-prepared number format "@NUMBER" or "@LOCALE", the number will be displayed according to the locale setting in the root Locale property (or the root LocaleNumber property). Also, if you directly specify a locale ID (@+locale ID) such as "@ja" or "@de" in the number format, the number will be displayed according to the specifications of the specified locale.
For detailed specifications on number formats, see "Number Formats" in Appendix.
|
The number format has various options and properties, allowing you to customize it flexibly. For details on how to customize the number format, see "Number Format" in Appendix. |
|
There are many different specifications for displaying numbers depending on the locale. For example, in "ja" (Japan), numbers are displayed in a format like "123,456.78" (commas separating every three digits, a period as a decimal point), while in "de" (Germany), it is "123.456,78", where the comma and period have the opposite meaning. There are also various other formats, such as using spaces instead of commas, or a format where commas are used to separate two digits except for the last three digits. When dealing with internationalization, care must be taken to determine whether to match the display style of the destination country, or to unify the operation of the entire system with one format (such as @ANSI). |
Functions supported by number format (excerpt)
Below are some of the features supported by Number Format (Locale).
■Numeric related methods
The following methods support number formatting:
These methods allow you to pass a number format as a parameter. For example, you can specify a format such as "@NUMBER", and they will return a number format according to the locale defined by the number format.
|
Of the numeric-related methods, CNumStr and (NS) are methods used in older versions. They still work for upward compatibility, but are not locale-compatible. For numeric-related methods, we recommend using CNumToLocale and CLocaleToNum. |
■Edit box control
You can specify parameters including the numeric format in TextFormat in Edit box control. By specifying a numeric format such as "@NUMBER", you can display/edit values according to the date and time format defined by the locale set in the numeric format. For example, if you specify "@de" (Germany), the decimal point will be represented by a comma instead of a period, and you will need to enter a comma when entering a number that includes a decimal.
(Example of @NUMBER)
![]()
(Example of @de)
![]()
■ Library parts
In the parts library, Numeric Display Part and Numeric Input Part, specify the number format in the Number Format property.
(Numeric display parts)

(Numeric input component)


For example, you can specify a format such as "@NUMBER", which will display the value in the number format defined by the locale for number formats.
For other screen library parts such as trend graphs, the display settings for numbers are specified in the number format.