def get_unit_name(measurement_unit, length='long', locale=LC_NUMERIC):
 locale = Locale.parse(locale)
 unit = _find_unit_pattern(measurement_unit, locale=locale)
 if (not unit):
  raise UnknownUnitError(unit=measurement_unit, locale=locale)
 return locale.unit_display_names.get(unit, {}).get(length)

def get_unit_name ( measurement_unit , length = 'long' , locale = LC_NUMERIC ) : locale = Locale . parse ( locale ) unit = _find_unit_pattern ( measurement_unit , locale = locale ) if ( not unit ) : raise UnknownUnitError ( unit = measurement_unit , locale = locale ) return locale . unit_display_names . get ( unit , { } ) . get ( length )
get the display name for a measurement unit in the given locale .