#NEWLINE# def number_format( value , decimal_pos = None , use_l10n = None , force_grouping = False ) : #NEWLINE# #INDENT# '\n    Formats a numeric value using localization settings\n\n    If use_l10n is provided and is not None, that will force the value to\n    be localized (or not), overriding the value of settings.USE_L10N.\n    ' #NEWLINE# if ( use_l10n or ( ( use_l10n is None ) and settings . USE_L10N ) ) : #NEWLINE# #INDENT# lang = get_language ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# lang = None #NEWLINE# #UNINDENT# return numberformat . format ( value , get_format ( 'DECIMAL_SEPARATOR' , lang , use_l10n = use_l10n ) , decimal_pos , get_format ( 'NUMBER_GROUPING' , lang , use_l10n = use_l10n ) , get_format ( 'THOUSAND_SEPARATOR' , lang , use_l10n = use_l10n ) , force_grouping = force_grouping )