How to add a new unit for \unit{} command?

Hi all,
I want to add new units to the \unit{} command but I can't find how to do it. I
found that one can changes existing units with the following luacode:
languages.data.labels.units.whatever = {Meter = "retem"}
but I found nothing to add new ones.
I would like to have, for exemple:
\unit{50 milli volt per division} to give: 50 mV/div.
Thanks in advance.
--
Romain Diss

Hi, Le mercredi 16 octobre 2013 14:47:11 Marco Patzer a écrit :
This lead to another question linked to these comments in 'phys-dim.mkiv'…
Technically, what's the difference between:
\registerunit[unit][division=div]
and
\registerunit[unit][division=division]
\setupunittext[division=div]
?
--
Romain Diss

Am 16.10.2013 um 21:21 schrieb Romain Diss
When you use your new unit "div” is printed because there is no label entry and context prints only the text as fallback.
Context looks for language dependent value of “division” and prints the value from the unittext entry, with this method you can also set different texts for different languages. Wolfgang

Le jeudi 17 octobre 2013 06:40:21 Wolfgang Schuster a écrit :
Actually this feature interests me because I wondered how to translate certain
unit labels, like for example:
\unit{2 day} gives: "2 d" but I would like it to gives "2 j" in french.
So if I type this:
\setupunittext[day=j]
I get the correct translation but how can I tell Context that this is the
translation for 'french' only?
--
Romain Diss
participants (3)
-
Marco Patzer
-
Romain Diss
-
Wolfgang Schuster