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

I worked with a 20-person team in Lima, Peru for several years on a classic ASP project. This was 10 years ago, so conventions may have changed, but at that time, all of the comments and variable names were in Spanish.

share|improve this answer

I'm from the Philippines. Most people code, document, and name variables in English here. Also, I find English to be one of the most suitable language to use in programming because it has richer vocabulary than most languages out there.

share|improve this answer

Yes, although I am Dutch I want everything on my computer to happen in English except for communicating with Dutch people or visiting Dutch sites... I really don't like the mix of Dutch and English all over the system and have thus chosen to do everything in the same language for consistency reasons.

When I was young I wanted to write everything in my own language, as for keywords...
But that just doesn't seem possible to accomplish. Maybe this is a good idea for a future language?

share|improve this answer

I'm from INDIA and as far as I have noticed all the Indians code in English.

share|improve this answer

In my former work we had habit of talking in Swedish and writing in English, when for example writing something on the drawing board.
I think it started when we had a lot of consultants from different contries at the work. We had to switch between English and Swedish depending on who was listening to you.

I have to make a distinction between writing code comments and even documenation in English and write and talk about common-day thing in English. It is not the same.
I have written more design documentation in English than I remember but that doesn't mean that I can talk about how to cook food or writing a poem in English, or write an answer on SO without making spelling errors or use improper grammar.

My wife is from latin america and we speak Spanish at home so I am in the situation that I speak two languages regulary (Swedish and Spanish) and write two languages regulary; Swedish and English, the latter mostly about technical matters. Writing documentation in English is a required skill when working as an engineer in Sweden.

share|improve this answer

In Germany i think it depends on how big and open the shop is. In bigger banks people write in English because you might have to deal with non-German speaking consultants for a specific job.

But also remember the OpenOffice fiasco when people found out that most of the StarOffice code was written in German.

share|improve this answer

I'm from Germany and I personally strictly code in english. The company I'm working at is doing projects for international customers and usually the code + comments are in english. The department I'm in though is doing a project for a german company only and most code in the core is full of german. I tend to produce new code in english and fill in english comments wherever possible.

share|improve this answer

I'm from Finland and all the programs I know have been written in English. I have seen few Finnish comments though, but they are certainly not the accepted practice. In some databases I have seen even some column names in Finnish, but that too is considered wrong.

As it is perfectly possible that some day you have a coworker from another country like Pakistan, I think that coding in Finnish would be just irresponsible. The sole exception are some customer specific terms and especially acronyms since they can be very hard to translate and the translation would probably be hard to understand. Also you wouldn't be able to use the whole Finnish character set in variables etc.

share|improve this answer

Most programming languages are designed for English and English is the international language of programming. The same for Aviation, anywhere in the world at any airport, English is the default language.

There are a few programming languages I believe that are designed for different languages, either Russian or a variation of Mandarin but I have no idea how used they are or what they are called.

share|improve this answer

As Spaniard working in Ireland, now I do all my code in English.

But I have worked previously on Spain for a multinational project and we have to code everything in English (although no one was English-speaker, mostly Spanish and French, which leads sometimes to some really funny weird comments). And after that, I worked on a Spanish company and all the code has to be on Spanish. The problem on setting variables in Spanish is that you can't use (depending on the language) all the characters, as some are not available in ASCII. So that always leads to some deliberate typos on variables, which some times can be annoying.

For example:

// English
int size = 0;
// Proper, non-ascii Spanish
int tamaño = 0;
// Bad but ascii Spanish
int tamanno = 0;

Another curious effect is that there are a lot of characters used on programming (like #{}[], etc) that are much more easily accessible on a English keyboard than on a Spanish one. I found more comfortable to program on English layout (now that I have get used to it) as I have to make less weird key combinations.

These days, when I code for personal projects, I code in English, but probably because I'm used to it...

At the end of the day, it's just a matter of who do you expect to read your code, I guess... If I had to program just by my own for a while, probably I will revert to Spanish.

share|improve this answer

I'm from Brazil, and I spent a lot of time in university coding half English, half Portuguese software. Later I switched to full English for almost everything, particularly any projects I was opening up for people elsewhere.

Now that I'm living and working in England I've started using UK spelling for variables and the like. It's slightly annoying to mix a variable colour and ActionScript attribute color, but I'll live. :)

share|improve this answer

I am from Bangladesh, and every single coder I know use English in their code. We even switch to English (or at least Bengali with lots of English words) when we talk about programming. This is true even for people who are otherwise not very comfortable in English. I have seen some people use Bengali for variable names and small comments, but that is always in very short scripts, throwaway programs, solutions to programming puzzles etc. and almost always as something of a joke intended to amuse the reader.

I think this is true for programmers in most non-english speaking countries. Most good books, tutorials, documentation are in English, as are the comments,docstrings and variable names in any code you can find. English is also the preferred language to communicate with other programmers from around the world. So IMHO learning and using English in an everyday basis is not something a programmer can easily avoid. It forms a base for the common culture of programmers everywhere.

share|improve this answer

I'm from China, If I write code for myself, I use English,

If I write code with my Chinese coworkers, I use Chinese comment,

If I write code with other Foreigners, I use English.

share|improve this answer

English is not my mother language but I definitely use strictly English for everything. To be perfectly honest I absolutely hate to see non-English comments or something else written in a language besides English.

Mainly, because I think it's one of the most beautiful languages and probably (maybe) because for the languages/frameworks/more I learned/learn I use strictly english materials(like textbooks, online tutorials).

share|improve this answer

I have been told by friends the the original SAP database system was codded entirely in German. Once they were bought out however, it was likely this was ported over to English.

share|improve this answer

I just start a PHP code with the following lines:

<?php
/* -----------------------------------------------------------------------------
 file name     : DOCUMENTROOT/index.php
 compatibility : PHP 5.2.x / UTF-8 [LF]
 description   : 
 copyright     : Copyright(C)2010 by *********
 date          : managed since [2010-09-01 19.05 (JST: GMT+0900) @462]
 encode phrase : 時々京の方向に幅が細くて美しい線が入った飾りを持つ雀が往く
 encode phrase : 男は傷の拳で美しく印刷された一冊の書を持ち憎い相手の笑いに応じた
 encode phrase : 牀前看月光/疑是地上霜/擧頭望山月/低頭思故郷
 encode phrase : 茨菰葉爛別西灣/蓮子花開猶未還/妾夢不離江上水/人傳郎在鳳凰山
 encode phrase : 上記の文はエディタにエンコード判定させるためのダミー文です。
 Git revision  :
----------------------------------------------------------------------------- */

to tell my text editor its encoding. Most text editors will not appropriately recognize an encoding of text file when it was opened in it.

share|improve this answer

I'm Dutch and often code in English, even my personal, internal code. My English vocabulary is also richer when it comes to programming / computer science and it doesn't make a lot of sense to (try to) use Dutch words. I.e. if I would be naming a method signature a "Methode handtekening" I doubt if any fellow Dutch coders would understand what I mean.

share|improve this answer

I'm from Spain: in a time now, I'm mixing code in English and Spanish. From now on, I will set it strictly in English. The idea of doing everything in English is not crazy, is the future.

share|improve this answer

At a company I used to work for, the management purchased codebase for a soccer game from an Italian company. None of us really played much soccer, and most of the variables and comments were written in Italian. That was not a fun project.

share|improve this answer

I noticed that is more easy for small groups to maintain an English-only standard. Big, bloated projects tends towards to use a mixed convention (English and Italian in my cases).

share|improve this answer

hell yeah from Morocco!
well i'm talking about my case, some people mix between english french and arabic.

share|improve this answer

I'm from Holland. Here, because very few dutch programmer resources exist, most people think and code in English. There are things in my personal life I couldn't explain in English, there are algorithms and patterns I couldn't possibly explain Dutch.

So my native language is dutch, except when it comes to IT related stuff.

share|improve this answer

I'm programming in germany. Most usually I see code written in english (as all the books we learn from and all the design patterns are english, and of course all official APIs are in english), but comments are frequently in german.

I try to write comments in english too, but I know thats not very common.

share|improve this answer

I'm from Romania, and where I am working there is a strict policy of adhering to standard notations and English. Even documents and how-to guides and wiki's are written in english. There is even no thought that you might write in the native tongue. English is by-default, and the company invests in compulsory English courses.

share|improve this answer

All identifiers are English. They look silly with the English keywords.

Comments are either in English or Dutch, not certain if that good, but the codebase is too big to adapt.

share|improve this answer

I think there is a lot of cognitive overhead when your code is part english, part some other language, especially if you're using some large API where you end up with english method calls on types declared in antoher tongue etc. So I'll use english unless I have a good reason not to.

One of these reasons, which I haven't seen mentioned, is ubiquitous language (as per the Domain Driven Design principles). If doing contracted work for which I rely on the knowledge of business experts, with whom I call one thing one way, and then in the code define the type in english, things get confusing, especially if that's and odd/unusual vocabulary which I'm not accustomed to...

Hence I've often been using a mix of the two, where business-critical objects and methods are named in the language AND tongue of the domain, and the rest of the code which is more of an infrastructure/technical concern is in english, to match the apis more smoothly.

But from a craftsman's point of view, I must say I have mixed feelings about this, and don't find this a very satisfying solution.

share|improve this answer

I'm from Israel, and professional programmers almost always use strictly English. However, sometimes, Hebrew seeps through, for example see PHP's scope operator.

share|improve this answer

We use English in most projects just to follow the APIs.

But you shouldn't be dogmatic about it because there are always exceptions. For instance if you work for a German insurance company you will face so many domain specific concepts and terms which are not translatable at all you should consider using the native language. This is a team decision.

share|improve this answer

We ALWAYS code in english. Comments and documentation are written in spanish if the customer really asks for it.

share|improve this answer

From my experience here in Germany, most professional programmers (as in capable ones) code in English. In my opinion, variable, function and class names in non-English are just plain ugly. :-)

share|improve this answer

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