Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
I think it doesn't make sense to implement in generic module such as Units. Units module supports any kind of units and US and EU formats apply only to some of them.
» Support for unit conversions and different unit systems
Status:
Closed (won't fix)
» Active
Hmmm, actually it would make sense, if MVF started to support unit conversions. Now MVF treats all units as separate, and to support EU and US formats it would have to know how different unit types relate to each other, and to convert values if needed.
Problem is I don't need it myself so unless someone provides a patch or willing to sponsor it won't be implemented. It could also become complicated very fast.
We'd find support for conversions useful too. The issues for us are related to the display and search of these values. It's fine to store them with the original value / unit. But then another user will want to see them converted to the unit (or units) that they're comfortable with, and also want to search them in that other unit.
Re the display of values (on nodes / views / etc.), it would be most useful if the (display) unit of a field could be chosen by the user, the value displayed changed immediately there, and the choice for that field be remembered, so it is also used when the next field of the same type is displayed, say on another node). Alternatively, a click on the field could pop up a display of the value converted to the various equivalents). Whichever way is chosen, enabling this could be an option for the field.
Related to this second aspect, I've added a feature request of MVF's in the Range Search for Faceted Search module (see http://drupal.org/node/736122).
Comments
Comment #1
crea commentedI think it doesn't make sense to implement in generic module such as Units. Units module supports any kind of units and US and EU formats apply only to some of them.
Comment #2
crea commentedHmmm, actually it would make sense, if MVF started to support unit conversions. Now MVF treats all units as separate, and to support EU and US formats it would have to know how different unit types relate to each other, and to convert values if needed.
Problem is I don't need it myself so unless someone provides a patch or willing to sponsor it won't be implemented. It could also become complicated very fast.
Comment #3
crea commentedComment #4
crea commentedComment #5
ailgm commentedWe'd find support for conversions useful too. The issues for us are related to the display and search of these values. It's fine to store them with the original value / unit. But then another user will want to see them converted to the unit (or units) that they're comfortable with, and also want to search them in that other unit.
Re the display of values (on nodes / views / etc.), it would be most useful if the (display) unit of a field could be chosen by the user, the value displayed changed immediately there, and the choice for that field be remembered, so it is also used when the next field of the same type is displayed, say on another node). Alternatively, a click on the field could pop up a display of the value converted to the various equivalents). Whichever way is chosen, enabling this could be an option for the field.
Related to this second aspect, I've added a feature request of MVF's in the Range Search for Faceted Search module (see http://drupal.org/node/736122).
Thanks for your work on this module.
Comment #6
superxain commentedI need this feature.
I use this module to store the weight information of items. It would be nice if users can:
Units API ( http://drupal.org/project/unitsapi ) can covert between units.
thx for the module.
Comment #7
bucefal91 commentedThe 6.x version is no longer supported, unfortunately.