English vs. British API names


#1

I am new to JUCE, and I would like to know if there is a way to set the language for API names automatically for instance to use setColor vs. setColour.


#2

I do believe you mean US vs. English API names

Rail


#3

Correct. I am assuming then, that there is only one spelling that the API supports which is English. I was just wondering if any of the US users of JUCE have possibly requested this type of dual compatibility. The English spelling changes that I have noticed thus far are things like: color vs. colour, centered vs. centred, words with a “z” in US are spelled with an “s” such as initialize vs. initialise and so on. The forum spell checker for instance is complaining that these words are spelled incorrectly as I am typing this. :wink:


#4

I think we all quite enjoy annoying the americans a bit on the spelling thing :slight_smile:

I guess if it bothers you then in your header you could add

using Color = Colour;

but I don’t think it’d be worth having aliased method names (I don’t think you can use the ‘using’ directive to provide an alternative to a method name)


#5

LOL at the spelling thing. You do right, and it’s makes a nice change being English TBH. But please explain why the word ‘center’ is everywhere? - is it the inevitable spelling creep?


#6

There are lots of places in 3rd party code where it’s used, but I don’t think there are many in our own code, are there?


#7

I noticed it in the FlexBox code then did a search, when I realised what it said. I guess we all get used the American spelling, until… it’s too late… :slight_smile:


#8

Well yes, FlexBox is a special case because it’s a standard, so we used the same property names as the standard does.


#9

Lol at this. Coding with JUCE makes me start thinking in a British accent.


#10

both normalis* and normaliz* are used in the juce api. Would be cool if it was consistent.
(actually the ‘z’ is mainly used in the dsp module, in methods parameters/private members, so that can be tweak without breaking changes)


#11

VIsualStudio should have a petty spell checker for this kind of thing :slight_smile:


#12

why not a mix of different API languages? As a contribution to international understanding…


#13

Having an Umlaut in my wife’s name I can tell you there are bigger problems than normalise vs. normalize… that would be internationalisation :wink:
(not implying anything juce-specific… so completely OT)