views:

365

answers:

5

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?

+15  A: 

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.

Esteban Araya
English is a Germanic language, not a Romance language ;-P. It has a lot of French/Latin influences, though.
Robert Fraser
@Robert: You learn something every day. I've removed English from the list.
Esteban Araya
Aren't you dodging the question with a lot of hair splitting mumbojumbo. I think the questioner asked if he could get a version of C# where the keywords are based on a language other than English.
JohannesH
I like this point. Incidentally, this is how I think about natural languages too: English has a word *come*, which means "move toward"; Spanish has a word *come*, which means "he/she eats". Despite the fact that they are spelled the same way, they mean completely different things. Likewise with programming languages. C# has a keyword *for*, but is it the same word as Python *for*? No, the two are only superficially similar; their implementation is completely different.
Daniel Pryden
@JohannesH: That may be what the questioner *meant* to ask, but it's not what the question actually says. And if you consider what he said "mumbojumbo" then you obviously have never studied semantics -- I found Esteban's answer quite clear and easy to understand.
Daniel Pryden
@Daniel: Ok, I retract "mumbojumbo". :) But you're right, I never did study semantics. Maybe thats why the *meaning* of his questions seems obvious to me. ;) I wonder how you would react if the C# team announced the new set of keywords "hvis", and "gør" and they then said; "It's not danish, it's C#". ;)
JohannesH
Esteban Araya
Heh... I lolled. +1
Randolpho
Daniel Pryden
A: 

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.

Scott
+13  A: 

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.

dtb
This is generally the case of most languages. Even if the native language spoken by a group of developers is not the same, they still need to have their code interoperate, thus there is only one language. After all, you are not programming in english (or hungarian or whatever) but rather in C# (or python or whatever).
TokenMacGuy
+4  A: 

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.

Guffa
I bet anyone unfamiliar with Swedish would have a mindmelt trying to understand some complex function in Swedish Excel :) Did that include Excel VBA too?
Russ Cam
A: 

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.

JohannesH