if result is None:
params.raise_error('No place with that OSM ID found.', status=404)
+ result.localize(locales)
+
output = formatting.format_result(result, fmt,
{'locales': locales,
'group_hierarchy': params.get_bool('group_hierarchy', False),
if debug:
return params.build_response(loglib.get_and_disable())
- fmt_options = {'locales': locales,
- 'extratags': params.get_bool('extratags', False),
+ fmt_options = {'extratags': params.get_bool('extratags', False),
'namedetails': params.get_bool('namedetails', False),
'addressdetails': params.get_bool('addressdetails', True)}
+ if result:
+ result.localize(locales)
+
output = formatting.format_result(napi.ReverseResults([result] if result else []),
fmt, fmt_options)
if debug:
return params.build_response(loglib.get_and_disable())
- fmt_options = {'locales': locales,
- 'extratags': params.get_bool('extratags', False),
+ fmt_options = {'extratags': params.get_bool('extratags', False),
'namedetails': params.get_bool('namedetails', False),
'addressdetails': params.get_bool('addressdetails', True)}
+ for result in results:
+ result.localize(locales)
+
output = formatting.format_result(results, fmt, fmt_options)
return params.build_response(output)