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.

Possible Duplicate:
Do people in non-English-speaking countries code in English?

I have a development comming that is intended to be sold across Latin America (Spanish speakers), but I've heard from some partners that is a good practice to always code in English, I mean just code (methods, classes, pages names, etc), labels on GUI are going to be all in Spanish...

Code will be edited in the future by developer of companies across Latin America and just maybe some from outside.

What do you think?, any experience with this?

share|improve this question

marked as duplicate by ChrisF Feb 17 '12 at 15:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

14  
I would say it's mandatory. You never know, maybe someone will outsource the code to some other country. –  Coder Oct 12 '11 at 16:39
2  
what about table names on data base? –  Milox Oct 12 '11 at 16:44
8  
Consider it to be a form of obfuscation for non-english speakers. –  Jon Raynor Oct 12 '11 at 16:45
2  
What about in-code comments? –  Sardathrion Oct 12 '11 at 16:57
2  
If your question is about what do other developers do, this is a duplicate, as @Caleb already mentioned. If your question is whether you should code in english or in spanish, the answer should be written in your requirements document. –  mouviciel Oct 20 '11 at 8:05
show 10 more comments

11 Answers

up vote 52 down vote accepted

I'm French and working in a French company.

However, we do code mostly in English. Here is why:

  • We sometimes have non-French people working with us so it's easier for them.

  • We have some code coming from third parties (lib, framework, etc.), and this code is often in English, so we don't want to end up with a patchwork of French-English code.

Generally speaking, this is not a problem because you have to understand English anyway if you want to be a good programmer.

share|improve this answer
2  
Understanding English is one thing. Being able to correctly and consistently translate terms from a problem domain you are only vaguely familiar with is a completely different thing. –  Michael Borgwardt Oct 20 '11 at 8:10
    
That's dumb. If you are not familiar with the domain, you'll have difficulties in both languages. This is a domain understandoing problem, not a language one. –  deadalnix Oct 20 '11 at 8:25
3  
Wrong. You can be 100% familiar with a domain without knowing how all the terms translate to English (and sometimes there are no really correct translations for some terms!). It's it's not uncommon at all to have a projct with such people as domain experts who write the specs, and programmers who implement the specs for whom domain knowledge is completely optional. Forcing those programmers to translate everything to English and back, that would be a really dumb decision. –  Michael Borgwardt Oct 20 '11 at 8:56
    
Well, the spec should be written with terms in english too. Unless tou have a national specific problem, thoses terms will exists in english. –  deadalnix Oct 20 '11 at 10:45
2  
You can talk all day long about how things "should" be, but that doesn't change the fact that the requirement to have everything in English incurs a very real cost (not just from doing it, but also misunderstandings and errors) that cannot always be justified. And no, it's simply not true that "those terms will exist in english". Example: In Germany, there's a broand (and very widely used) category of securities called "Zertifikat" for which no equivalent English term exists (all English terms are either more specific or more general). –  Michael Borgwardt Oct 20 '11 at 11:01
show 1 more comment

In most programming languages the keywords are in English, so it generally looks a bit forced if you mix languages.

For this reason, as well as developer numbers, English tends to be the language used in most developments, even developments by companies based in non-English speaking countries.

share|improve this answer
4  
Except Lingua::Romana::Perligata! –  svick Oct 12 '11 at 21:42
    
@svick: Hush now, we don't speak of LRP ;) –  Daenyth Oct 17 '11 at 19:42
add comment

In general, as said in other answers: Programming languages use English keywords and when a project becomes larger you might get foreign people working on the code. Additionally concepts like "getters" and "setters" or instance in languages like Java are commonly called getFoo or setFoo and it makes sense to keep this convention.

On the other hand you might create an application for a specific target market. I for instance was working for a large bank developing bilance analysis software where we had German financial and legal language. In the end we decided to use German identifies to keep the exact terms as the English terms sometimes had a slightly different meaning on the other side we kept the convention to use English in other places, so we had functions like getUmlaufvermoegen() (instead of getCurrentAssets()) which looks "funny" but proved to work well as we could easily go throught the calculations together with the experts from the bank who defined the calculations we did but was consistent with frameworks etc.we used.

share|improve this answer
    
I wish I could upvote this more. Coding everything in English sounds great in theory, but translating domain terms for the sake of language consistency is not a great idea... –  Michael Borgwardt Oct 20 '11 at 8:07
add comment

I live in Colombia and we are taught to write our code in english for the sake of universality, most of the good programmers know the 2 languages anyway because its necessary and because almost all good documentation and reference is writen in english;

So i think is safe to write your code in english its very likely that they are going to understand and it is a good practice.

share|improve this answer
1  
thank you compatriot, are you writting your comments and DB objects in english as well? –  Milox Oct 12 '11 at 17:58
add comment

We were discussing coding standards recently at work and an interesting point came up. We are English speakers in the UK, and we have been directed to code in US English. As hard as it is for us to swallow our pride, we have to accept that this is the right thing to do. Although there is no difference in the keywords, much of the .NET framework is in US English, and I accept it is better to keep the consistency, rather than put national pride first :).

It also might help your English (not that there's anything wrong with it!). The big question is, with the emerging economies on the rise, when will us English speakers have to learn to code in Brazilian Portuguese, Russian, Hindi or Mandarin :)

share|improve this answer
    
yeah good point Paul I think things are kept reasonably simple with English but who knows what's in store for the future? If I may be a bit drastic or draconian here hah Who knows in the next decade if humans will code? Us lot will be replaced by a bunch of machines! –  MalsR Oct 13 '11 at 10:41
    
Maybe, but who's going to write the code for the machines? :) –  Paul T Davies Oct 13 '11 at 10:53
    
Crikey hmm yeah it's all uncertain I'm afraid :) –  MalsR Oct 13 '11 at 11:42
2  
I am brazillian and code in UK english when I remember the UK version of a word or construct. :P I think UK english is more beautiful and sounds better. –  speeder Oct 18 '11 at 17:59
    
sometimes the spelling differences help e.g. Color is a type Colour is a property –  jk. Oct 20 '11 at 10:01
add comment

This is a tough one. The problem with having all the variable names in English is that you have to translate the customer's domain from their native language into English. And that is really hard sometimes, as naming stuff is one of the more difficult problems in programming. If you are trying to practise DDD then creating an ubiquitous domain language is nearly impossible. There will always be two versions of every concept and meaning gets lost in translation.

But on the other hand if you mix another language into the code base (besides English) then it will always look messy and be unreadable for everyone that cannot speak that language.

As a native English speaker living in Sweden, I lean towards translating everything to English except for the odd word that just cannot be translated without losing some of its meaning.

share|improve this answer
add comment

I live in Italy and here you usually see English mixed with Italian or English words with Italian suffixes.. This is very widespread, for example in a slide in a CS university course I saw:

bool checkFatto;

("check done")

I'm a strong believer that all code, including comments, and even including in person developer talk should be in english. Italian simply doesn't have many of the required words required to discuss programming topics. But this is virtually never done.. Maybe that's why I chose to telecommute for an american company.

Something that bothers me just as much is people who google programming questions in italian or look up the italian wikipedia. They have no idea of the quantity of the information they are missing out on (such as the entirety of SO).

share|improve this answer
4  
In person developer talk? I really don't think so. If I speak with my colleagues that have the same native as me, I am going to speak with them in that. And if some term doesn't exist there, or it wouldn't be clear, I'll just use the English term. Being good programmer requires you to read well English technical text. But that's not the same as being able to speak coherently in English. –  svick Oct 12 '11 at 21:46
1  
I dont understand why this question get a downvote. +1 for me since I agree I can't imagine seeing stackoverflow clone in Italian. –  Rudy Oct 13 '11 at 3:35
    
It's not that Italian doesn't have the words, It's more that Italian is a much more verbose language. –  Adriano Varoli Piazza Oct 18 '11 at 18:28
add comment

English:

GetUserInvoices(int userId);

Spanish:

ObtenerFacturasDelUsuario(int idDeUsuario);

English words are usually shorter and easier to read, that's one of the reasons why I usually code in English (I am from Spain). The other one is that I find ugly to mix Spanish words with the English language keywords and framework classes and members.

share|improve this answer
add comment

It's a dilemna from me: for mechanism and key words, or read documenation, no real problem.

My english is poor, and this language have no words for many subtle significant ideas.

I've tried to developp in english, it lead me astray, and I have to make it again with known words that represent the real world.

So, for core/essential code it is in French (nobody's perfect) with dual languages translation with hope that for a native english it is not so diffucult to have the keys of understanding close to the some piece code (not all).

It is not proudness, just to enrich the work with different cultures and to do job in the best manner.

share|improve this answer
add comment

When we started our application five years ago we only had 4 Dutch programmers. But we wrote everything in English.

Today, our code is used by French colleagues and Indian developers. Thanks to using English, they can also use our code. The French colleagues have quite a bit of french in their comments and naming schemes. We can still make some sense of it but it's a lot easier if everything is in English.

In short, what if tomorrow you have a few Brazilian colleagues?

share|improve this answer
add comment

I firmly believe that no serious developer can be uncapable of, at the very least, understanding English in written form. How else would you refer to any library's documentation, read a book on a highly specialized matter or even use Stack Overflow?

In your particular case, chances are that if a client "requires" the source code to be in their local language, they could be a quite low-profile company, and perhaps you wouldn't like to establish a relationship with such a customer.

share|improve this answer
add comment

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