Although automatic language translation is thought to be a bad idea units are generally not language specific but a form of science/math. For sites like gardening, it's common for questions/answers to be posted in both SI and imperial measurements which is a pain for users familiar with the other.

Although some attempts on other sites may have lead to dismal results, that shouldn't be a reason not to attempt this. If one adopted that approach, then SO wouldn't exist either.

So, would it be a good idea to implement automatic unit conversion? This could be done as an in-situ replacement, or just have the conversion added in parentheses. One could just start with temperature conversions ...

  • Similar question on Seasoned Advice with an answer from Robert Cartaino. meta.cooking.stackexchange.com/questions/105/… TLDR; his answer is to edit the questions manually because auto converters usually suck. – Catija Apr 1 '16 at 22:25
  • Luckily gardening has a much more restricted domain and would be more easily implemented – Graham Chiu Apr 1 '16 at 22:28
  • 1
    If you're only interested in Gardening, then this should be on their Meta. – Catija Apr 1 '16 at 22:29
  • It would apply to any science based site – Graham Chiu Apr 1 '16 at 22:31
  • 1
    The reason I mentioned that is that "any science-based site" wouldn't necessarily be as simple as Gardening, either... so your "restricted domain makes it easier" argument is silly. – Catija Apr 1 '16 at 22:36
  • You'd start with a much more restricted domain to see how it worked. And gardening is already still in beta. – Graham Chiu Apr 1 '16 at 22:38
  • Fine... let's ignore all of that... this sounds like a feature request, not a support question... how does this work? How do you tell the system that it's looking at a unit that needs to be converted in the first place? How do you make certain that it interprets the units correctly - e.g.: is "m" meters or miles? What do you do about users that don't specify their units at all... presumably you can guess that "90 degrees" (when talking about ambient temp) is in Fahrenheit... but is it? – Catija Apr 1 '16 at 23:02
  • I believe it's called artificial intelligence. – Graham Chiu Apr 1 '16 at 23:06
  • 3
    I don't see how spending months (or years) creating an AI to interpret questions on SE sites for whether they might include some sort of convertible unit is a good option... at least on the Seasoned Advice question they were considering markup options that made the process simpler on the system though required some base knowledge from users. – Catija Apr 1 '16 at 23:10
  • New users learn markdown. – Graham Chiu Apr 2 '16 at 0:14

Like PythonMaster notes, dynamic unit conversion would be a bad idea, especially if based on the user locale (since it's very often wrong or misleading). You really want every reader to see the same thing, so that any mistakes in the conversion can be reliably spotted and fixed.

Trying to automatically parse units out of normal text also seems doomed to failure, especially given the existence of common units like "feet" that are also common English words. (You really don't want the system to try converting something like "a horse has four feet" into metric.)

All that said, if we had some explicit markup for requesting unit conversion, and if it was implemented so that everyone sees the same output, then this could be doable and useful. In fact, Wikipedia already has a similar system in place, demonstrating that it can be made to work.

Obviously, I'm not suggesting that we steal Wikipedia's syntax for this — wiki template markup is kind of ugly and awkward, and doesn't fit Markdown very well. But we could come up with our own syntax for accomplishing the same thing; perhaps something as simple, in cases where the default conversion settings are adequate, as, say [7 miles] producing "7 miles (11 km)".

Obviously, even with the possibility of stealing leveraging parts of Wikipedia's implementation (or something similar), this would not be a trivial project, and I don't really see Stack Exchange investing a lot of developer time on this (since it's not a critical part of their core business). But if someone were to, say, develop a Pagedown plugin for this, it just might be possible to get it enabled on sites that have a use for it.

  • I think it's much easier for editors to amend questions/answers to conform to a standard format suitable for automatic conversion then for editors to do the conversions themselves. As for the difficulty, this is related to how good the programmer is at their job. – Graham Chiu Apr 2 '16 at 0:11
  • 1
    What, you've got something against the fact that a horse has 1.2192 meters? – Mark Apr 25 '16 at 23:38

Naturally no.

Most of the times, an auto-converter as per location of the user will not work out as:

  • The user may understand both systems

  • The location the user gives is false and misleading

It would be a serious pain for SE to create something to convert one unit to another, especially which unit. Do you want milliliters into cups or pints? Do you want quarts converted into liters or some other unit? It makes this more difficult as SE does not know what unit needs to be converted into which unit.

The conversions themselves might get very, very complicated, long, and very annoying too.

  • I, at least, have a preferences page on my profile. – Graham Chiu Apr 1 '16 at 22:59
  • It would be way too much to fill in and the conversions will be very complicated – Anthony Pham Apr 1 '16 at 23:00
  • I can do Fahrenheit to Celcius in my head. – Graham Chiu Apr 1 '16 at 23:01
  • Now, what about the thousands of other users who can't and use Google who do so? – Anthony Pham Apr 1 '16 at 23:02
  • Exactly, that's why I'm asking for this feature. – Graham Chiu Apr 1 '16 at 23:03
  • Convert everything to SI units. Considering the international science community agreed on common units makes us doing it seem a no brainer – Nic Apr 17 '16 at 19:57
  • @Nic But SI units aren't commonly seen – Anthony Pham Apr 17 '16 at 20:20
  • @PythonMaster aren't seen where? Is there a way to see all the answers on a site that include units? – Nic Apr 17 '16 at 20:37
  • A special markup for unit conversions, such as @ilmari-karonen suggests, is badly needed on a website which is essentially a giant international collaboration. The user may understand both systems: no problem with that. The location they give is false: solved by allowing them to nominate what units they want to see. Just the option of imperial or metric would cover many cases. Although I agree automated conversion would be challenging, I think this answer overstates the difficulties of a feature that in-principle is both possible and desirable. – Jarrod Smith Jun 22 '16 at 4:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .