Units Strings i18n
-
Are these unit strings internationalized?
And if so, how do I access them in a language-independent way?
Update - Ah, by index number?
-
@jim said:
And if so, how do I access them in a language-independent way?
Update - Ah, by index number?YES.
model = Sketchup.active_model manager = model.options provider = manager['UnitsOptions']
see:
class OptionsManager
http://code.google.com/apis/sketchup/docs/ourdoc/optionsmanager.htmlclass OptionsProvider
http://code.google.com/apis/sketchup/docs/ourdoc/optionsprovider.htmlinterface OptionsProviderObserver
http://code.google.com/apis/sketchup/docs/ourdoc/optionsproviderobserver.htmliterating the members of 'UnitsOptions' gives:
UnitsOptions Provider LengthPrecision ; 4 LengthFormat ; 1 LengthUnit ; 0 LengthSnapEnabled ; true LengthSnapLength ; 0.0625 AnglePrecision ; 1 AngleSnapEnabled ; true SnapAngle ; 15.0 SuppressUnitsDisplay ; false ForceInchDisplay ; false
Notice how there are 10 options, and 10 controls in the dialog.
Also, important, often you must call UI.refresh_inspectors after changing options via Ruby, in order to see the changes reflected in the dialogs. (This is true of the Styles dialog, at least.)
-
A dumb question, I think. Of course "Meter" is always "Meter" in any language.
-
@jim said:
A dumb question, I think. Of course "Meter" is always "Meter" in any language.
Actually not, it's 'metre' in French (and I think most of the EU uses that spelling.) But it's still the same unit.
-
It's actually the other way round: the word 'meter' is spelled 'metre' [for a unit of 'length'] in almost all languages, except American English where it's become 'meter'.
The USA follow the spelling convention of center==centre, theater==theatre, color==colour etc, but the rest of the world took the original French spellings for most of these words [*sometimes with a little adjustment couleur>>colour] - and the French did invent the 'metre' !
*The US idea was to go back to the Latin - so 'color' [from 'color/em'] is more sensible than the UK spelling which came from Latin to French and then to UK English [color/em>> couleur>> colour] - AND you don't pronounce half of these words like they are spelled anyway - it should be culler or kuluh ?
Back to 'meter' - in UK English there are two words 'meter' and 'metre' - the first is a device for measuring something [like a gas-meter or a parking-meter] or an arrangement of words in poetry or notes in music; the second is the 'unit of length'... The word 'meter' can be a noun or a verb [e.g. to meter electricity consumption], but then 'metre' is always a noun ?
-
In Norway it's "meter".
-
@tig said:
The US idea was to go back to the Latin ... spelling which came from Latin to French and then to UK English ...
..um, actually it's not Latin, it's Greek, metron/metros [μέτρον/μέτρος]@tig said:
and the French did invent the 'metre' !
I take issue with the word 'invent.' I would replace it with the phrase 'first to design, approve and put into use, a decimal based measurement system.'
Others, including Englishmen, Germans and Italians had made proposals for a decimal based metrological system (or units for such a system,) predating the French effort, by more than a century.@tig said:
... in UK English there are two words 'meter' and 'metre'
This British method (with two words,) makes alot of sense!
I wish we (in the US) would adopt this as well.P.S. As you might guess by now, metrology is one of my major interests.
-
OK, you [almost] got me...
Webster's US spelling ideas were to base America's English spellings on the original roots - which he took usually to be Latin - as in ***center/centrum, color/em, labor/em, honor/em etc, instead of centre, colour, labour, honour etc used in Johnson's 'English' English taken via the French...
[***actually even 'kentrus' is also a Greek word for a 'spur-point', but became the more usual meaning 'center' when in Latin]So, although some words did originate in Greek, they had long been borrowed into Latin - like Greek's metron/metros which became Latin's meteri/metiri/metrum [both concerning 'measure']...
Words like 'metrology' do come from two Greek roots - 'measure' and study' - metron-logos...
The word 'meter' for a measuring device is [probably] from the Greek root too...
English is also proficient at wrongly combining Greek and Latin roots into single words - e.g. 'Television' [Tele=Far (Greek) + Visio=Sight (Latin)] - which might have been more logical as something like Teletheamation or Videoeminus ???The French Commission in charge of sorting out their newfangled 'metric' system chose the word 'metre' as the length-unit's name - most say from the Greek root 'metron'>'a measure' - and it is often prefixed with Greek 'number-roots' like deca, kilo, giga, micro, nano etc, but also several Latin rooted ones like deci, centi, milli, micro [Gr&L!] etc, to confuse things completely. Latin's 'metrum' ain't that different anyway and the French did make Latin's 'center/centrum'>'centre' so why not with 'metre'? So I still believe that Webster's spelling of 'meter' for a unit of length was taken from the Latin root 'meter(i)' as it was his preferred root source - albeit perhaps mistakenly, if the French had indeed taken it from Greek as 'metre' !
To quote Webster's Dictionary directly on this: 'Meter' = Old English mēter, from Latin metrum, from Greek metron = measure, meter; Anglo-French metre, from Latin metrum...
What's in a name ? ...
I used the word 'invent' in invisible 'quotes' - they did 'make' the 'metric' system - by definition it is based on their newfangled 'metres' !
Advertisement