Internationalization and localization tools


Locale-Sensitive Python Method

locale.format_string(format, val, grouping=False, monetary=False)

Internationalization (I18n) Method Overview

The format_string method formats a number val according to the current LC_NUMERIC setting. For floating point values, the decimal point is modified if appropriate. If monetary is true, the conversion uses monetary thousands separator and grouping strings.

Click here for more information.

I18n Issues

This is the correct method to call for localized formatting. It is preferred to the deprecated locale.format method. Be sure you have setlocale correctly.

Globalyzer will detect this method and report it as an I18n issue. If you have determined that the call is being handled correctly, you can use Globalyzer's Ignore Comment functionality to ensure that it isn't picked up in a subsequent scan.

Locale-Sensitive Python Methods

Lingoport internationalization and localization services and software