Does the C# language localize for people that have their machine's set to some language other than English?
In other words, is C# always unconditionally written in English?
Does the C# language localize for people that have their machine's set to some language other than English?
In other words, is C# always unconditionally written in English?
C# is written in C#; C# is a language in and of itself. You can name your variables whatever you want, but reserved words are C#, not English, Spanish, or any other language.
Take the word for the type "int" (or Int32). You can't say that "int" is an English word; no English speaking person really uses the word Int32 to talk about an integer. Or how about the phrase "do while"? No one says: "Hey Bobby, do task x while the time is less than 5pm".
Some of the C# reserved words have their roots in English, but that does not mean they're anything like the English language. Spanish, French and many other "romance" languages share the same root, but they're not the same.
Well, reserved words are English, not C#. while, if, for, let, from, using...etc.
The .NET CLR has very impressive extensibility hooks for the language itself. So you could implement your own DSL that has keywords in french or spanish pretty easily I believe.
C# is standardized in the C# Language Specification (ECMA-334).
There's only one set of keywords (English) and is the same for everybody. The .NET Framework (which is not part of the C# language) also uses English for all class and method names.
Of course, you may name your variables and method names as you like. C# supports the whole range of Unicode characters.
The keywords are derived from english words, but the keywords never change regardless of the local language.
The only place that I have seen a localised programming language is in Excel. The function names for formulas are translated, so for example in a swedish version the If
function is called Om
.
The C# keywords and the BCL class and member names are, and will always be, English only. However it is legal to name your own classes and members in any language you like, though I wouldn't recommend it.
Furthermore you can get language packs for the .NET framework which will localize strings like exceptions messages.