Take the 2-minute tour ×
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
14  
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
55  
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
3  
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 4 more comments

locked by Thomas Owens Sep 17 '13 at 9:49

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

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 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, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

108 Answers

I'm Italian and always use English, for names and comments. But many other Italian programmers use Italian language, or more often a strange English-Italian mix (something like IsUtenteCopy).

A real life code sample:

// Trovo la foto collegata al verbale
tblVerbali rsVerbale;
hr = rsVerbale.OpenByID(GetDBConn(), m_idVerbale);
if( FAILED(hr) )
    throw CErrorHR(hr);
hr = rsVerbale.MoveFirst();
if( S_OK != hr )
    throw CError(_T("Record del verbale non trovato."));

By the way, the Visual Studio MFC wizard creates a skeleton application with localized comments:

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
    if( !CMDIFrameWndEx::PreCreateWindow(cs) )
        return FALSE;
    // TODO: modificare la classe o gli stili Window modificando 
    //  la struttura CREATESTRUCT

    return TRUE;
}
share
7  
Siamo messi proprio male :P –  Federico Culloca Sep 8 '10 at 23:11
5  
Thanks for the code sample - that's awesome. –  Damovisa Sep 9 '10 at 0:43
2  
@Lorenzo method like isUtenteCopy is a must here in italy, lol! –  systempuntoout Sep 9 '10 at 7:13
13  
That's one of the reasons I'll never work in Italy.. –  Andreas Bonini Sep 9 '10 at 13:15
3  
I've just ran into a fellow developer yesterday who happened to work on some international firm, they are adding some features to a system that it was build by and for an Italian telecom company. Unfortunately they almost code everything in italian, that includes variables, methods names, comments, and even logs!!Even during some sort of a handover session only one developer from the Italian team could speak English well enough to walk the folks through the code.. Anyway, it seems Google Translator is getting great reputation in my friend's team now :D –  Shady M. Najib May 17 '11 at 12:01
show 8 more comments

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
add comment

I'm from Egypt. I think we switch to English by default when we talk, or even think about code. Most of the learning resources - regular ones like books, and even blogs, podcasts and so on - are in English. Switching to your mother tongue means turning your back to lots of great resources.

I guess this post might convey my point, via Jeff Atwood: http://www.codinghorror.com/blog/2009/03/the-ugly-american-programmer.html

share
3  
Being from the US, I hate to admit it but the 'Ugly Americans' still hold a lot of cultural influence in our country (to the detriment of us all), especially in business. Just like racism, sexism, etc... cultural progress in the states is measured the same as it alway has been. One generation at a time. –  Evan Plaice Sep 11 '10 at 9:45
show 2 more comments

I'm from the rotten state of Denmark. We primarily write code in English. Even the development guideline states that it should be as well. Being the newest developer in the company I assume that it was decided due to the framework we are using was done in English. It would be a horrible mess to read mixed Danish and English :)

With that said, we do write comments in Danish :)

share
add comment

I have always coded in English. Also, I never wanted to code like this either:

क = 1;
कुल = 0;
जब तक क छोटा है 10 से  {
    कुल += क;
}
छापो कुल

कार्य खाली मुख्य ( )      अंक समय       लिखें "Enter current time"    
     पढें समय        अगर [ समय < 12 ]    
        लिखें "Good Morning"    
  वरनाअगर [ समय >= 12 और समय < 16 ]    
           लिखें "Good Afternoon"    
  वरना              लिखें "Good Evening"    
  खत्म अगर    
खत्म कार्य
share
add comment

I'm from Quebec and a French speaking person, but all my code, comment and documentation is always done in English. But I know some companies in Quebec that enforce French in the code (comments and object/variable naming).

share
show 1 more comment

C#, it really works (Cyrillic):

[Flags]
public enum Товары
{
    Непонятно = 0,
    Книги     = 1,
    Тетради   = 2,
    Карандаши = 4,
    Всё = Книги | Тетради | Карандаши
}

..
Товары карандаши = Товары.Карандаши;

There is fun (weird) in that Visual Studio allows it and someone is writing code by using his/her native language (non-English).

share
11  
For those who don't speak Russian or are too lazy to look up the translation, Товары is Items; Непонятно, Unknown; Книги, Books; Тетради, Notebooks; Карандашы, Pencils, and Всё is All. I only note this because speakers of Romance languages tend to be able to muddle through other Romance languages, and I think Slavic languages tend to be underrepresented in the West (I have Polish heritage). I also assume that that 3 should be a 4. –  Jon Purdy Sep 16 '10 at 0:25
19  
next time I need to obscure my code I'm using Cyrillic. –  Talvi Watia Sep 23 '10 at 7:41
6  
I'm Russian, but I hate code member names written in russian. Who said that I will support this code all the time? May be tomorrow I'll be fired, and on my place will be somebody from other country. –  Genius Feb 11 '11 at 9:47
1  
@JonPurdy In Poland there is no Cyrillic, we use Roman alphabet with few specific letters, e.g. "Dzień dobry" –  psur Mar 6 '12 at 9:12
show 10 more comments

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
show 1 more comment

I (dutchy) always code in English, it just makes much more sense, all the language keywords, etc. are in English, so why not code the rest in English? :)

I always put all comments in English as well. You never know who will have to edit your code, they might not speak your native language.

share
add comment

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
add comment

I'm surely the weird one: I use a language that is tokenized, and so even the language itself can be displayed in your own native language (French, English, German, Spanish and Japanese). It's an RBDMS language born in the 1980s, called 4th Dimension. Have a look at the Language Command translation by clicking on the flags icons.

Hereunder you can see the same code seen with French and English settings.

alt text

alt text

share
show 3 more comments

I'm from Belarus, but I'm always use English for comments. And as I know a lot of Belarus programmers use English as primary language for coding.

    /// <summary>
    /// Get item quantity
    /// </summary>
    /// <param name="itemCode">Item code</param>
    /// <param name="grade">Grade</param>
    /// <param name="lpn">LPN</param>
    /// <returns>Returns item quantity</returns>
    private int GetQuantity(string itemCode, string grade, int lpn)
    {
        using (var db = new MappingDataContext(_connection))
        {
            db.ObjectTrackingEnabled = false;
            return (from i in db.INVENTORs
                    where i.ITEM_NO == itemCode
                    where i.CUSTCHAR12 == grade
                    select i.ITEM_NO).Count();
        }
    }
share
2  
OT: Your code example contains 7 lines of comments without any real content besides repeating the name of the function and the parameters. I wrote this, because I did the same thing in the past until I realized that it’s a complete waste of time for everyone involved. I know a “comment compulsion” like this hard to overcome, because a function without a comment header look so unfinished once you are used to it, but focusing only on important comments will save you a lot of time and improve your commenting skills in general. –  xsl Sep 20 '10 at 12:08
1  
@xsl, Thorbjørn: this is XML documentation in C#. Technical documentation can be generated from these XML comments. There is a tool called Ghostdoc that creates and fills these stubs automatically, so creating these 7 lines of documentation does not require typing at all. While it usually does not provide value to the programmer who edits the code, visually, it separates methods and is not obtrusive. –  Marek Oct 28 '10 at 12:07
show 2 more comments

I am from England, and I try to code (and post on sites like Stack Overflow) in US English, because that is the established international language for programming.

I think I am in the minority though. Some British programmers I know insist on using British spellings even when collaborating with other coders who are using US English and can get upset when an American or Indian colleague edits their comments to change from British to US English (don't try that on Ward's wiki.)

share
2  
Likewise - I'm English and generally use US English when programming. I still want a "Colour" property that's just a synonym for Color, but other than that I've got over it. The fact I was taught Oxford-style -ize rather than Cambridge-style -ise makes it easier anyway. –  Richard Gadsden Sep 9 '10 at 10:44
7  
I use British spellings everywhere, for no better reason than because I can. –  Dan Dyer Sep 12 '10 at 14:35
2  
I use British (read: international) spelling everywhere but in code—much to my own chagrin—for consistency with, somewhat ironically, international de facto standards. –  Jon Purdy Sep 16 '10 at 0:27
1  
@Jon it doesn’t seem then that British is quite so international as you would have us read. –  nohat Oct 6 '10 at 17:50
4  
I know colleagues who write in British English just to annoy American colleagues. –  Sir Wobin Feb 11 '11 at 9:28
show 3 more comments

In the Visual Studio editor, most of the places we deal with non-English bugs are in comments, and they are most east-Asian languages (Input Method Editor (IME) related). I'm pretty sure I just saw one the other day where right-to-left text in comments displays incorrectly in quick info or parameter help, so there are certainly people doing it :)

share
add comment

Even for personal projects I tend to use English mostly because it's easier to ask questions about the code on Stack Overflow or other websites. The same goes for my operating system - I only use English. I had a Dutch operating system once, and it's really horrible to google for errors or information.

There is one advantage of coding in another language and that is that you most likely won't run into conflicting or reserved words.

share
add comment

I have never seen anyone use non-English names in code here in Israel, but my experience is limited to university projects. At any rate, I personally only code in English, and I actually also type all my emails and homework assignment in English. This is mainly because Hebrew is written right to left, and it can be very annoying incorporating English terms into the text.

share
1  
I definitely know of some people who transliterate in chats and SMS. However, I would really frown upon that in code, especially in comments. –  EpsilonVector Sep 8 '10 at 23:18
show 2 more comments

I'm from Slovenia and I code strictly in English. I have seen different programs coded in Slovenian because the client demanded so. Apparently it's easier to read the code like that.
So yes, people don't only code in English.

And I'm talking about the code itself, not software localization.

share
show 2 more comments

I'm from Canada, but live in the States now.

It took me a while to get used to writing boolean variables with an "Is" prefix, instead of the "Eh" suffix that Canadians use when programming.

For example:

MyObj.IsVisible

MyObj.VisibleEh
share
21  
This is a joke, right? –  Philip Jun 10 '11 at 19:09
21  
It better be, but its pretty funny. –  HelloFictionalWorld Sep 16 '11 at 2:44
2  
This is the funniest thing I've seen on the internet so far –  timeNomad May 7 '13 at 8:13
6  
@Philip "This is a joke eh?" –  rlemon Jun 26 '13 at 13:17
show 1 more comment

In PHP the :: operator is called Paamayim Nekudotayim which is hebrew for double colon. The rest of the langauge is in English. The first time I saw that error message about half of my office kind of confused us. And that was at a company in Israel

share
add comment

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
add comment

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
add comment

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
add comment

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

share
add comment

I am from Denmark, and even though many of the technical terms translates nicely to danish, it is the norm to use the english terms (though some tend to ONLY use the danish terms, but I guess you see them everywhere).

Personally, I code in English; Meaning that all my comments, my variables, classes and so on, are in English. I do this because it makes it so much easier. If I want to make my code public, everybody can read and understand the program. If I am going to help out a friend with a code-example, I don't have to translate the comments beforehand.

share
add comment

I am Indonesian currently living in Kuwait.

In the first year of my computer science studies, I used Bahasa for almost everything except int main(). But I noticed that some of us code in english already.

All of our programming books are in english. I find it very difficult to find words in Bahasa that are equivalent for programming terms. So instead of using half-english-half-bahasa language, I (and most of my friends) started to make every possible effort to code in english.

In my first working experience in Jakarta, Indonesia, I was obliged to code in english.

share
add comment

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

share
add comment

I'm Hungarian, working in my home country with a team consisting mostly of fellow Hungarians. We always write our code and comments in English, since that is the official language of the company anyways. In addition to that, some of our projects are open source, which really mandates that everything is in English.
This has a funny side effect, by the way: sometimes my mind stays in "English mode" after work and I keep thinking in English on the way home.

share
add comment

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
add comment

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
add comment

When I was at university in Switzerland I worked on a Modula-2 project, where everything (variables, comments, messages, etc) was in French, except for the keywords of the programming language. They also told me there were preprocessors available that would allow you to write the keywords in French as well, so "si" = "if", "alors" = "then", "sinon" = "else", etc.

share
add comment

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