Enwiki's {{convert}} template is a behemoth of a structure which is
intended to do this. I once made an attempt to write a PHP-side extension
to do it (look at the revision history of the ParserFunctions extension),
but it never took off [1]. I don't think there was ever any enthusiasm to
take the ability to "tinker" with the formatting and output ({{convert}}
has a million and one different stylistic variations and parameters) away
from wiki template editors.
--HM
[1] https://bugzilla.wikimedia.org/show_bug.cgi?id=40039
On 17 January 2014 10:56, Jasper Deng <[email protected]> wrote:
> I would like to ask, how are significant figures going to be dealt with?
> 300 could mean anything from one to three significant figures, for example.
>
>
> On Fri, Jan 17, 2014 at 1:47 AM, Marc Ordinas i Llopis <
> [email protected]> wrote:
>
> > On Fri, Jan 17, 2014 at 9:58 AM, Petr Bena <[email protected]> wrote:
> >
> > > For example you would say the object has width of {{unit|cm=20}} and
> > > people who prefer cm would see 20 cm in article text, but people who
> > > prefer inches would see 7.87 inch.
> >
> >
> > This is a great idea! As proposed it'd be very helpful, but maybe it'd be
> > better if it showed the original text and a conversion on mouse-over
> (maybe
> > with a small icon to indicate it, like external links).
> >
> >
> > > This could be even based on
> > > geolocation for IP users
> > >
> > >
> > Oh, please, don't use IP geolocation for anything. It's terrible for
> people
> > travelling, using proxies, living abroad, living in places where more
> than
> > one languages are commonly spoken, learning new languages… If you want to
> > get an initial default, use Accept-Language (like, inches for en-US and
> cm
> > for anyone else :) and allow the user to modify it.
> >
> > Thanks,
> > Marc
> > _______________________________________________
> > Wikitech-l mailing list
> > [email protected]
> > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
> >
> _______________________________________________
> Wikitech-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l