Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I've heard it said (by coworkers) that everyone "codes in English" regardless of where they're from. I find that difficult to believe, however I wouldn't be surprised if, for most programming languages, the supported character set is relatively narrow.

Have you ever worked in a country where English is not the primary language?

If so, what did their code look like?

share|improve this question
13  
It makes sense to name all things code in English to make it more integrated with frameworks not even mentioning the non-latin writing languages (I should find some Cyrillic or Chineese code; that would be interesting). The question is of course: Should it be British or American English? There are parts in .net framework with British spelling while most of it is in American. – Robert Koritnik Sep 15 '10 at 19:07
3  
Really? Where is the British spelling? The American English used to annoy me (I'm Australian), but I'm used to it now... – Damovisa Sep 16 '10 at 2:39
45  
The problem with questions like these is that people writing English answers to your English question on this English Q&A site are probably not representative of all programmers in non-English-speaking countries. – Larry Wang Sep 20 '10 at 5:36
2  
a code sample wonderfl.net/c/iUH0/read – www0z0k Feb 5 '11 at 14:33
1  
@Larry Wang: True, Stackoverflow users probably aren't representative. But we work at normal companies with normal coworkers and normal (read: representative) coding rules. So I think the answer's to this question aren't that distorted. – nikie Feb 5 '11 at 23:33
show 3 more comments

closed as not constructive by Jeff Atwood Sep 26 '11 at 3:14

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.

110 Answers

1 2 3 4

I speak Afrikaans as a first language. When I code I usually use a mix of Afrikaans and English variables and I mostly comment in Afrikaans. As we have 11 official languages I would code in English for official purposes (government projects etc.). If I quickly write code to test things I almost always code and comment in Afrikaans.

share|improve this answer

Swede here. I believe in Sweden most code is written in English simply since that's the way most programmers learn to program. All literature, all samples etc used in teaching (and on the web) is in English so it's natural to code in English. And I believe that's the way it should be.

There is one area though where it becomes problematic and that's when you start applying Domain Driven Development and want to follow the pattern of Ubiquitous Language. Now suddenly you want your code to be in English but at the same time you want your team and the business representatives to use the same terminology and although there is a lot of Swenglish in corporate Sweden you get an awfully uggly conversation when people start to mix the two languages.

share|improve this answer

Hola soy de Argentina y siempre usamos variables y comentarios en Castellano. En algunos casos los clientes solicitan la documentación en ingles y solo en estos casos se usa otro idioma. Saludos!

share|improve this answer

I'm from Latvia, and I'm coding only in English. Makes the code look much more fluent and pure. Plus, my language is filled with all the fancy characters like "š", "ž", "č".. and therefore, makes it kind of unhealthy for the code.

But that's only my opinion..

share|improve this answer

Have a look on this Chinese markup language project site:

http://code.google.com/p/chtml/

share|improve this answer

I'm not a native english speaker but yes I code and write all my comments, class names, variable names, function names in english. Why? Well just because it makes more sense for me and it makes it much easier to share my code. Just my 2 cents

share|improve this answer

I'm Mexican, living near the border with USA (in Hermosillo, Sonora). I code all of my work (personal and for the company) in English, and I encourage my friends and teammates to do so too.

I have found that this give us a flat terminology (everyone, here and in other parts of the world use the same word for the same thing) and make out integration with our clients seamless.

Here in Mexico, and especially in some part near the border with the USA, a new kind of "Spanish" has been talked among several population groups, the "Spanglish" (yes, it just not a [bad] movie, but also a cultural term) and sometimes, this permeates to the "engineering layer" and the they start using terms like "linkear" (to link, create a link) or "parsear" (to parse), so I ask every programmer that I know just use plain English.

share|improve this answer

Mexican here

Whend doing my own work, i mostly use english, as many tutorials and examples are in english, i do code a lot in english though all comments are done un spanish, but when working on my companies software, i do code all in spanish

share|improve this answer

Once I've worked with code which was written by Italian programmers, and once by German programmers. It was standard MFC/C++, so of course all the keywords and language/platform was in English. But the variable names, classes, functions, and inline comments were in Italian and German, respectively.

It's amazing how much difference that makes in terms of readability and ease of maintenance.

On the flipside, I can imagine that as a non-English speaker, it would be quite a steep learning curve to learn a programming language/platform where all the keywords and APIs are in English. Even if all the documentation is translated and you can look it up.

share|improve this answer

I'm swedish and pretty much all my code is in english.

An intresting concept in this regard is Domain Driven Design, in that process it is a major point to not translate words and concepts:

Direct translation to and from the existing domain models may not be a good solution. Those models may be overly complex or poorly factored. They are probably undocumented. If one is used as a data interchange language, it essentially becomes frozen and cannot respond to new development needs.

Therefore:

Use a well-documented shared language that can express the necessary domain information as a common medium of communication, translating as necessary into and out of that language.

So if domain specific terms are in the local language and not translated along with the rest of the code, a domain expert but non-programmer can get a grasp of what the code does.

share|improve this answer

I had worked for a few months in Japan. Although the code was in English the file headers and small amount of comments they had was in Japanese. They actually had to find me a English keyboard to work with.

share|improve this answer

I'am from indonesia, and english is not our primary language, but all of programmers that i know is coding in english including the code comments.

share|improve this answer

I'm a Chinese and we write code in English while we write the comments in Chinese.

share|improve this answer

Yes. I live in Switzerland and my native language is German.

share|improve this answer

my native language is russian (i live in moscow), however i wright code, comments, svn comments (when it's allowed by repository rules), even project descriptions/documentation (also if allowed) only in english. and i use english documentation/language references.
there're generally two reasones for that: consistency of the result ,the fact that i'm really not going to translate any programming-related texts of mine - ever ;)

share|improve this answer

To me (from Denmark) it falls most natural to code in English. I guess there are two reasons.

First of all, all keywords and API classes and methods are already in English, so writing variables and comments in Danish makes the code inconsistent to read.

Secondly, all books, blogs, QA sites like P.SE and SO, are in English. So it is almost like my brain switches to an English mode when dealing with programming.

There are times however, where I would not choose English.

Sometimes you work in domains that are so tied to concepts that are language specific that they are impossible to translate to English. E.g. I worked at a mortgage issuer, and all their domain is loaded with legal terms, terms specific of Danish mortgage systems, etc.

I also worked with a system submitting forms to the government. Also here the domain was loaded with untranslatable terms.

So in the case the the domain is highly specific to the country where you work, you should keep the domain concepts in your local language. Otherwise the developers will speak a different language than the domain experts, and that will lead to poor communication.

share|improve this answer

In Czech Republic, the debate is still somewhat alive between three schools of thought:

  • Use English, only 10^7 people speak Czech
  • Use Czech without diacritical marks, not every environment supports them
  • Use Czech with diacritics, yay Unicode!

Since that time I worked in a Dutch company which had most code written under the assumption that "we're all Dutch here, what would we use English for?" (and later expanded across Europe), I've switched to English for everything - code, comments, and metadata. After all, my colleagues have been Czech, Dutch, Bulgarian, French, American, Turkish, Swedish, and Croatian - with English being the common language (after all, the Dutch guy was not happy when we needed him to translate comments every day ;)).

share|improve this answer

I usually do everything in English when programming C#, but sometimes we throw in some Spanish or Italian in comments. Some business objects are in Spanish (but always mixed with English for actions and such).

Now, when I’m in Objective-C, I always stick to English. It makes so much sense (in the way the language is structured) that it’s easier to read.

share|improve this answer

I am English and have lived and worked in Germany. I nearly always use English unless I can't think what the English term for something is. Then I use a German word.

I have met one or two who insist on only using English ('because it is better') but then spell things incorrectly which can be very bothersome when it makes its way into the API. There have been some compile-issues when using accents (for example, 'Müller') in source code. These have been forbidden.

Team discussion is exclusively in German. Coding is mixed. Most tend towards German names for variables and methods, etc. but will use English when it suits them. What ticks me off is when the English spelling is wrong.

share|improve this answer
show 1 more comment

I'm from Brazil, and in my last job, some guys didn't speak english, so we had to write things in portuguese, but most of the people wrote in english.

share|improve this answer
1 2 3 4

Not the answer you're looking for? Browse other questions tagged or ask your own question.