<p>Every programming language I know (Java, C++, C#, Python, etc.) are all made in English. That is, you can't, for example, type <code>imprimir(&quot;hola&quot;)</code> instead of <code>print(&quot;hi&quot;)</code>. You have to use English words for all programming keywords.</p>
<p>Why are almost all programming languages based on English?</p>

<syntax><language-design>
Why is almost every programming language made in English?
CC BY-SA 4.0
2024-01-28T03:03:28.397Z
[List of counterexamples](https://en.wikipedia.org/wiki/Non-English-based_programming_languages), although I still think the question is a great one. Welcome to PLDI!
Seggan
CC BY-SA 4.0
2024-01-28T03:52:01.130Z
The question is essentially answered in the first paragraph of the above Wikipedia page.
Barmar
CC BY-SA 4.0
2024-01-28T03:58:35.383Z
@SlightlyPsychotic While there are many counterexamples, none of them have anything near the popularity of the English-based languages. I'd guess that 99% of software is written in less than 10 languages, and they're all English. And the reason is likely that most development of computers and programming languages occurred in English-speaking countries (primarily US and UK), and in the last 50 years English has become the lingua franca of the global economy.
Barmar
CC BY-SA 4.0
2024-01-28T12:24:11.150Z
You can allow most programming languages to utilise almost any other language by the use of 'libraries" or equivalent.
Russell McMahon
CC BY-SA 4.0
2024-01-28T16:56:54.260Z
They were developed during the American Century, many of them by the U.S. government itself.A huge number of leading computer scientists and software engineers were monolingual English-speakers.
Davislor
CC BY-SA 4.0
2024-01-28T20:53:09.427Z
Not an answer in itself, sure, but don't forget to consider that very many languages, although using the Latin alphabet, have accented letters in addition to the base 26. And early computers didn't have those, not even uppercase and lowercase, just the base Latin letters, digits and the rest.
Gábor
CC BY-SA 4.0
2024-01-29T06:20:11.913Z
Microsoft Excel went a different way, and it's extremely frustrating, because if I have a simple table with a simple SUM in it, if I open it on a version of Windows with a different language, it does not work, because it expects the local language's word for the sum.
vsz
CC BY-SA 4.0
2024-01-29T19:58:22.587Z
@JohnDoe I'm pretty sure that is not because Italian is special, but rather because the Wikipedia list is not exhaustive. There's [itaco](https://github.com/luca3m/itaco), [ruggine](https://github.com/DamianX/ruggine), [italian ruby](https://github.com/Pluvie/italian-ruby), [latin perl](https://metacpan.org/pod/Lingua::Romana::Perligata), …
Bergi
CC BY-SA 4.0
2024-01-30T16:15:24.350Z
If I wanted to create a new programming language that should be widely used, I'd ask myself what language most people probably prefer. Country A people speak language A and most of them English, country B people speak B and most of them English and so on... so that would be my choice too.
puck
CC BY-SA 4.0
2024-01-30T17:22:15.603Z
Just want to make it clear that only the keywords have to be in English (and in some languages like C or Perl most of the keywords are in fact syntax marks, not words). There's nothing stopping you from writing a "Hola Mundo" program in Basic.  `print ("Hola Mundol!")`
T.E.D.
CC BY-SA 4.0
2024-01-30T20:21:30.200Z
We tried it in Visual Basic 3 or 4, I don't recall which. Since the code was stored as a token sequence, we would detect if the user was running, say, French Windows and display the code using French functions and keywords. It was a NIGHTMARE for testing and even worse for documentation, and users didn't really want or need it. Non-native speakers of English adapt quickly to the keywords.
Eric Lippert
CC BY-SA 4.0
2024-01-30T20:24:04.273Z
That whole feature set got cut but all the gear for supporting it still existed in OLE Automation, and so when I was working on VBScript and JScript in the 1990s we had to test for all these scenarios where a late-bound dispatch might have different behaviours depending on locale. Again, it was a nightmare. A huge amount of work for me for absolutely no practical user benefit.
Eric Lippert
CC BY-SA 4.0
2024-01-30T20:24:29.313Z
Ada Lovelace was English and so was Alan Turing. Maybe the English were bored enough to dream up a computer :)
noelicus
CC BY-SA 4.0
2024-01-31T03:30:57.640Z
Because this might happen: [Why can't my program compile under Windows 7 in French?](https://stackoverflow.com/q/22780466/2821954) (note: April Fools joke).
Andrew T.
CC BY-SA 4.0
2024-01-31T04:03:27.577Z
This is but a small example of a general trend of favoring English. In the scientific world, if a paper is not published in English it is as good as not existing. There are counterexamples of course. Einstein published a lot of his early work in German. Then again, most of the top theoretical physicists and chemists at the time were German. But generally it is still true. There's even a historical trend of theories and proofs "discovered" by being translated from its original language into English. All the top scientific journals are in English
slebetman
CC BY-SA 4.0
2024-01-31T09:32:29.943Z
The English speaking [British Empire](https://www.google.com/search?q=how+english+became+a+global+language) had a little something to do with it.
candied_orange
<p>For English I assume it means a global language. For why English has become a global language, I think it's more of a question about history, instead of PLDI. Here I answer why a programming language would choose keywords from a global language.</p>
<p>Firstly, as Seggan commented, there are a lot of programming languages using other natural languages. But it is much less likely someone would get to know a programming language not in either English or their first language. If you use English, you have a much broader user base, that could potentially get your language much more popular. If someone wants a broader user base, they would also choose English. So, in the end, the most popular programming languages you have known are in English.</p>
<p>I think there are only two alternatives for this purpose. One is to make it multilingual.</p>
<p>There were some animation makers and game designers that had a way to make easy programs using a GUI list of commands, and the commands tend to be translated. It's easy because the translation doesn't change how the code is stored, but only how they are displayed. But users switch to the traditional way quickly, because the graphical way usually only support a restricted set of features, and the editor isn't very easy to use. Better examples on this direction would be Scratch-like languages. I don't know Scratch much, but I think it's much more powerful than the GUI lists, but still not as powerful as modern advanced languages.</p>
<p>The obvious problem of supporting multiple languages in traditional text programs, is the identifier names could easily conflict with keywords or system libraries in a language that the programmer doesn't know, or not even existed before the program has created. It might be better if the programmer chooses the language. But there is another problem, that translations tends to be slower than the original release, and if it's not the original developer making all the decisions, sometimes translations are bad and are subject to change, which would be very undesirable to use in a programming language. The programmers could use English before the translations are stable, but they would still have to learn the English version, adding more difficulty to just use English, and they would need an automatic translator to change the language afterwards. A potentially better way would be like the GUI lists, that only translate the words in the editor. In either case, I think they are not considered reliable operations for program source code, especially with eval and homonyms in consideration.</p>
<p>But I don't think these difficulties are absolutely unsolvable. Maybe someone could come up with some clever ideas. And they could start from languages that least likely conflict with English. I think the real problem is, keywords are not the only thing in a programming language. Documentation and libraries matter more. A translated programming language is of no use, if there are not documentations at all. And not many language designers had the resources to maintain documentations in that many languages. Library writers usually had less resources. That also answers why there had to be a popular programming language, instead of everyone using their own programming language in their own country: Actually there is not much reason for a programming language. You could do it if you had enough funds. But the reason is strong for libraries, and languages don't affect that much without libraries. A possible middle ground is, make everyone use their own language internally in a project, and export the symbols in English, to make a library popular, cost-effective, and non-English. But it might be difficult for us to know it is the case.</p>
<p>TL; DR: The majority of libraries would support only one language, and you'll not know it if it is not English. Programming languages doesn't contribute much to the whole picture, but have extra difficulties, that may not worth it.</p>
<p>Another way is to use symbols, like APL. But that only applies for a small set of builtins. They still have to use words in natural languages if there are a lot of libraries.</p>
<p>Also note that while programming languages borrow words from natural languages, they are not the same. Some words like &quot;for&quot; &quot;yield&quot; are too generic but have gained much more specific meaning. But they may not affect translation.</p>
<h3>Survey about the documentation languages in some programming language's homepage</h3>
<p>Python has English, Spanish, French, Japanese, Korean, Brazilian Portuguese, Turkish, Simplified Chinese, Traditional Chinese, 8 or 9 languages</p>
<p>PHP has English, Brazilian Portuguese, Chinese (Simplified), French, German, Japanese, Russian, Spanish, Turkish, 9 languages</p>
<p>Rust has English (en-US), Español (es), Français (fr), Italiano (it), 日本語 (ja), Português (pt-BR), Русский (ru), Türkçe (tr), 简体中文 (zh-CN), 正體中文 (zh-TW), 9 or 10 languages</p>
<p>Ruby has Български, Deutsch, English, Español, Français, Bahasa Indonesia, Italiano, 日本語, 한국어, polski, Português, Русский, Türkçe, Tiếng Việt, 简体中文, 繁體中文, 15 or 16 languages</p>
<p>C# has Bahasa Indonesia, Bahasa Melayu, Bosanski, Català, Čeština, Dansk, Deutsch (Österreich), Deutsch (Schweiz), Deutsch, Eesti, English (Australia), English (Canada), English (India), English (Ireland), English (Malaysia), English (New Zealand), English (Singapore), English (South Africa), English (United Kingdom), English (United States), Español (México), Español, Euskara, Filipino, Français (Belgique), Français (Canada), Français (Suisse), Français, Gaeilge, Galego, ქართული, Hrvatski, Íslenska, Italiano (Svizzera), Italiano, Latviešu, Lëtzebuergesch, Lietuvių, Magyar, Malti, Nederlands (België), Nederlands, Norsk Bokmål, Polski, Português (Brasil), Português (Portugal), Română, Slovenčina, Slovenski, Srbija - Srpski, Suomi, Svenska, TiếngViệt, Türkçe, Ελληνικά, Български, қазақ тілі, Русский, Српски, Українська, עברית‏,‎ العربية, हिंदी, ไทย, 한국어, 中文 (简体), 中文 (繁體), 中文 (繁體 香港特別行政區), 日本語, 48 or 69 languages</p>
<p>Scratch (user languages) has Аҧсшәа, Afrikaans, العربية, አማርኛ, Aragonés, Asturianu, Azeri, Bahasa Indonesia, বাংলা, Беларуская, Български, Català, Česky, Cymraeg, Dansk, Deutsch, Eesti, Ελληνικά, English, Español (España), Español Latinoamericano, Esperanto, Euskara, فارسی, Filipino, Français, Frysk, Gaeilge, Gàidhlig, Galego, 한국어, Hausa, Հայերեն, עִבְרִית, हिंदी, Hrvatski, isiXhosa, isiZulu, Íslenska, Italiano, ქართული ენა, қазақша, Kichwa, Kiswahili, Kreyòl ayisyen, Kurdî, کوردیی ناوەندی, Latviešu, Lietuvių, Magyar, Māori, Монгол хэл, Nederlands, 日本語, にほんご, Norsk Bokmål, Norsk Nynorsk, Occitan, ଓଡ଼ିଆ, Oʻzbekcha, ไทย, ភាសាខ្មែរ, Polski, Português, Português Brasileiro, Rapa Nui, Română, Русский, Sepedi, Setswana, Slovenčina, Slovenščina, Српски, Suomi, Svenska, Tiếng Việt, Türkçe, Українська, 简体中文, 繁體中文, 76 or 80 languages</p>

CC BY-SA 4.0
2024-01-28T10:42:40.827Z
2024-01-28T10:42:40.827Z
user23013
CC BY-SA 4.0
2024-01-28T17:41:37.803Z
I think most of the C# documentation is automatically translated, and rather badly. It's almost always better to read the original English one.
Bergi
CC BY-SA 4.0
2024-01-29T11:42:43.557Z
"简体中文, 繁體中文,": ["Oh, we got both kinds: Country *and* Western!"](https://youtu.be/vS-zEH8YmiM?t=28)
Peter - Reinstate Monica
CC BY-SA 4.0
2024-01-29T11:49:14.687Z
@Peter-ReinstateMonica That's the reason for the "a or b languages". C# has 10 kinds of English which I doubt they all have some differences.
user23013
CC BY-SA 4.0
2024-01-29T11:54:12.343Z
@Bergi And that means serious translated documentations of a traditional language would be much less likely to have a number that matches Scratch.
user23013
CC BY-SA 4.0
2024-01-29T15:58:37.253Z
ALGOL-68 should be mentioned for keywords, since keywords were technically in no language; the language had an if operator, and a compiler had to represent that in some way different from a variable spelled if or se, usually in quote marks, as ''if'' or ''se'' or ''если''.
prosfilaes
CC BY-SA 4.0
2024-01-29T19:18:44.550Z
Goal for translation, automatic or not, should be that the average native speaker of the language understands the translation better than the untranslated original. That is very often not the case. Once had a video recorder with German manual that mentioned a button for saving the light of the day (in German). I had to translate it back into English to figure out it was daylight saving time (DST). In proper German it is just “summertime” vs “wintertime”.
gnasher729
<p>The basic explanation is firstly that English is a widely spoken language around the world, and secondly that most computer technology has originated and continues to originate from America, where they speak English.</p>
<p>Moreover, post-WW2 America became a centre in the world for scientific research of all kinds, so that the technology doesn't just originate in America but so do a lot of the ideas, terminology, and standards, and the academic institutions that gestate them.</p>
<p>Scale is important too. Not only does America itself speak English, but so do a number of its major allies and trading partners who have equally advanced economies with demand for computerisation. This means that a large mass of English-speaking professional workers, and technical artefacts and tooling in English, have already been accumulated, completely dwarfing what was ever available in any other language.</p>
<p>So if a company wants development done today, the biggest pool of resources are in English. Even if you hire developers who speak a local language, they are likely to have to also speak English to access the existing resources just to learn their trade in the first place, let alone continue to practise it commercially.</p>
<p>Since the internet, there is also a huge &quot;hive mind&quot; of practitioners worldwide who can be consulted on difficult problems. These practitioners are either native English, or speak English as a lingua franca. This means practitioners have to carry on speaking proficient English regularly in order to consult with this hive mind.</p>
<p>Once all that investment is sunk in English-centric learning and speaking, there's usually very little to be gained, commercially, from diverting things back to the local language.</p>
<p>Only nation states with a political policy on language, and with an enormous commitment of economic resources, could really hope to challenge this dominance of English, but none yet have seen fit to do so.</p>

CC BY-SA 4.0
2024-01-29T14:05:13.837Z
2024-01-29T14:05:13.837Z
Steve
<p>America has been the center of technology in general and computer related technologies in particular since the second world war.</p>
<p>The first decades after the war coincide with the development of the first widely used programming languages, which consequently happened in America or in international teams with American participation, in English, without giving it much thought. Most people working in the field speak enough English to at least read programs with English keywords and basic documentation, which made it easy for them to latch onto that development (surely easier than, say, a development in Mandarin, Spanish or Hindi, to name other widely used languages.)</p>
<p>Obviously, that made English a great choice for keywords in newly conceived languages, even though for the past 10 or 20 years the number of programmers whose mother tongue is Mandarin may have been larger than the number of those with English mother tongue. Close to nobody outside Asia speaks Mandarin; almost everybody with a college education speaks some basic English. English is the <em>lingua franca.</em></p>
<p>And then there is great value in knowing the meaning of &quot;for loop&quot;, &quot;if clause&quot;, &quot;assignment&quot; or &quot;statement&quot;; computer science has developed a jargon much like medicine or jurisdiction which makes communication efficient and clear. Any non-English implementation would need a glossary with definitions which most likely would have to refer to the English originals in any case.</p>

CC BY-SA 4.0
2024-01-29T09:58:52.140Z
2024-02-01T10:12:14.363Z
2024-02-01T10:12:14.363Z
Peter - Reinstate Monica
CC BY-SA 4.0
2024-01-29T10:55:48.413Z
@12431234123412341234123 I'll translate your comment for the general public: "It is simply wrong that America has been the center of computer related technology since the 1950s -- Taiwan would be a better candidate (today, not 1950)." It's possible that the U.S. has lost their dominating position recently -- in 2022, for the first time in decades, IBM did not file most IT patents (Samsung did). But the current contender would probably be Korea (with Samsung and LG), not Taiwan. In other metrics (labor force, revenue) I suppose the U.S. is still ahead of the tigers.
Peter - Reinstate Monica
CC BY-SA 4.0
2024-01-29T12:34:30.597Z
As mentioned on the main question, [content on non-language-focused StackExchange sites is required to be written in English](https://meta.stackexchange.com/a/13684/391137). Therefore, any further non-english comments on this answer will be deleted.
lyxal
CC BY-SA 4.0
2024-01-31T01:00:59.873Z
[Citation Needed], whilst I agree that America has had some impact on the computing world, this seems to completely ignore the efforts of British companies, notably Dennis Ritchie, Creator of C.
ATaco
CC BY-SA 4.0
2024-01-31T04:13:43.093Z
@ATaco from my brief reading, it looks like Ritchie did all his research work at Bell Labs in New Jersey?
qwr
CC BY-SA 4.0
2024-01-31T04:22:29.320Z
@qwr Oops, that he did. I got my Bell Labs confused
ATaco
CC BY-SA 4.0
2024-01-31T07:18:22.270Z
@ATaco All countries have their eminent CS pioneers (Turing, Zuse) -- but in the end it was all U.S. centered. They were simply the technologically most advanced country in the post-WWII 20th century,
Peter - Reinstate Monica
<p>There are real problems with compatibility once one steps outside of &quot;ASCI and related territories&quot;.</p>
<p>The best example I know is <a href="https://en.wikipedia.org/wiki/LaTeX" rel="nofollow noreferrer">LaTeX</a>: it is technically a language for typesetting mathematics, not a programming language proper.</p>
<p>Now, any LaTeX document containing an &quot;Umlaut&quot;, i.e. ä instead of &quot;a, does not always compile for non-German users.  Same for French accents, Spanish tilde, etc.  This problem is exponentially worse when a non-Latin alphabet is used.  I recall being unable to get &quot;LaTeX in Japanese&quot; going on my mac as late as 2010.  In turn, simply printing PDFs produced by standard LaTeX on a Japanese printer, was already a challenge.</p>
<p>I also recall the <em>Underhanded C contest</em> making use of similar-but-different letters to introduced security holes.  This would be much
worse if there was not &quot;Standard English&quot;.</p>

CC BY-SA 4.0
2024-01-29T12:28:38.630Z
2024-01-29T12:28:38.630Z
Sam Sanders
CC BY-SA 4.0
2024-01-31T04:07:35.467Z
the attack described in the last paragraph is called script spoofing: https://en.wikipedia.org/wiki/IDN_homograph_attack
qwr
CC BY-SA 4.0
2024-01-31T04:09:35.343Z
From what I remember, PdfLaTeX was notoriously difficult for supporting other scripts, while XeTeX and LuaTeX, Unicode characters work perfectly fine. https://tex.stackexchange.com/questions/618009/is-there-any-reason-to-prefer-a-unicode-symbol-versus-its-latex-command-counterp
qwr
CC BY-SA 4.0
2024-01-31T11:04:25.523Z
In my limited worldview, PDFLaTeX is still (most) widely used; the other ones being (much) more niche.
Sam Sanders
<p>Many programming languages inherit reserved words such as <code>if</code>, <code>else</code>, and <code>while</code> from other programming languages, with semantics that are also inherited from those other languages, rather than from English per se.  If a programming language were to have reserved words <code>providedThat</code> and <code>asLongAs</code>, and the semantics of construct like:</p>
<pre><code>asLongAs (x &lt; y)
{      
  providedThat (func(x) &gt; 3)
  {
    action2();
  }
  action3();
}
</code></pre>
<p>were intended to match those of C's <code>while</code> and <code>if</code> constructs, the use of <code>asLongAs</code> and <code>provitedThat</code> instead of <code>while</code> and <code>if</code> would make the meaning less clear, even to people who would have no trouble understanding the English meaning of the phrases &quot;as long as&quot; and &quot;provided that&quot;.  If someone who spoke a different human language were to have it use that language's phrasing for &quot;while&quot; and &quot;if&quot;, the same issues would apply.</p>
<p>If a programming language is going to have some reserved words that correspond with English-based reserved words that exist in other language, basing other reserved words on English words or phrases would generally make code seem more consistent than arbitrarily mixing in foreign words.  If, however, a human language had a single word that would naturally describe a concept that would take multiple words in English, a programming language might benefit from using that word, <em>especially</em> if the single word would fit the semantics of the construct better than any practical English-language phrasing.</p>

CC BY-SA 4.0
2024-01-29T17:52:04.450Z
2024-01-29T17:52:04.450Z
supercat
<p>I think the primary reason for this is the same that motivates any other <a href="https://en.wikipedia.org/wiki/Lingua_franca" rel="noreferrer"><em>lingua franca</em></a>: the desire to exchange ideas <em>across</em> different groups.</p>
<p>We can group the places where natural language is used in programming into a few different categories:</p>
<ol>
<li><strong>Keywords</strong> - terms baked into the syntax of the language (&quot;if&quot;, &quot;return&quot;, &quot;while&quot;, etc). These are what linguists would call <a href="https://en.wikipedia.org/wiki/Part_of_speech#Open_and_closed_classes" rel="noreferrer">a &quot;closed word class&quot;</a>; they may be reserved from use as identifiers, or marked out with <a href="https://en.wikipedia.org/wiki/Stropping_(syntax)" rel="noreferrer">stropping</a>.</li>
<li><strong>Built-in identifiers</strong> - names of functions, namespaces, classes, etc, which are part of the &quot;standard library&quot; of the language. These are generally an &quot;open class&quot;, in the sense that new items are added reasonably regularly, and can move somewhat freely between this and the next category.</li>
<li><strong>User-defined identifiers</strong> - this is the much largest list, and also the one over which languages designers have least direct influence. The main limitation placed is the available <em>character set</em> - if identifiers can only use the Latin letters in ASCII, some languages will be harder to use (though not impossible).</li>
<li><strong>Error messages</strong> and other output. This generally depends not on the <em>design</em> of the language, but its <em>implementation</em>. These may be the same thing (e.g. PHP has only one widely used implementation), or entirely separate and widely varied (e.g. C compilers).</li>
<li><strong>Documentation</strong>. On the face of it, this is the <em>easiest</em> to translate, and for example <a href="https://www.php.net/docs.php" rel="noreferrer">the PHP manual is currently &quot;fully&quot; translated into 9 languages</a>.</li>
</ol>
<p>Of these, the vast majority of code that looks like language is <strong>user-defined identifiers</strong>. These can be, and regularly are, written in the user's first language - <strong>except when they're shared</strong>. If a new online service wants to publish an SDK on a package repository such as CPAN, NPM, Packagist, Nuget, etc, they need to define a <em>public API</em> for that package, and that involves choosing identifiers. If the majority of packages on that repository use identifiers in the same language, that is a <em>lingua franca</em> in exactly the same way as the trade languages of the ancient Mediterranean, or the Latin of Renaissance scientists.</p>
<p>This then leads back to the choice of <strong>built-in identifiers</strong>. The language designer could, in principle, provide multiple aliases for every built in function, giving the user a choice of languages. However, this becomes a wasted effort if the user community picks one as the <em>lingua franca</em> for sharing code samples and libraries.</p>
<p>As we get deeper into the core of the language, and particularly with <strong>keywords</strong>, we get a similar effect <em>between</em> languages: if you want new users to pick up your language, there is an advantage to them recognising parts of it. This leads to certain terms becoming somewhat standardised in their meaning - the <em>lingua franca</em> is <em>based on</em> a particular natural language, but becomes its own thing. For instance, the &quot;return&quot; keyword originated from the <em>intransitive</em> English verb meaning &quot;go back&quot;, but has acquired programming-specific meanings: &quot;returned value&quot;, &quot;return type&quot;, and so on.</p>
<p>To circle back to <strong>error messages</strong> and <strong>documentation</strong>, like private identifiers these can be and often are translated; but they will still have to incorporate large parts of the <em>lingua franca</em>, to mention keywords and identifiers which are <em>not</em> translated.</p>
<p>All of that leaves us with a few situations where <em>not</em> using the <em>lingua franca</em> would be reasonable:</p>
<ul>
<li>Where the language has no &quot;open word class&quot;. For instance, Microsoft Excel has localized names for all its built-in formula functions.</li>
<li>Where the language isn't intended for writing code to share. The biggest example of this is educational languages: the main aim is to make it easy for users to write their own programs, to learn programming concepts.</li>
<li>Where the audience for the language is limited to a particular community. The macro language of an internal tool might exclusively use the local language of its developers, although the draw of the <em>lingua franca</em> will still be there from exposure to other languages.</li>
</ul>
<p>Throughout this, I've deliberately talked about the <em>lingua franca</em> in the abstract, because the fact that it is based on English is largely historical accident: English was the language in the UK and USA where major early computer science work happened; and it's also a <em>lingua franca</em> in other contexts, meaning it is <em>accessible</em> to a lot of users as a second language.</p>

CC BY-SA 4.0
2024-01-28T14:39:18.797Z
2024-01-28T14:39:18.797Z
IMSoP
CC BY-SA 4.0
2024-01-28T17:34:50.640Z
I think you forgot "comments" and "application/library documentation"
Bergi
CC BY-SA 4.0
2024-01-28T17:51:03.337Z
@Bergi True; I guess d"ocumentation" can be broken down almost in parallel to code: core language documentation, third-party public API documentation, and internal documentation such as comments.
IMSoP
CC BY-SA 4.0
2024-01-29T19:50:24.823Z
I've worked with native Russian speakers who say they _prefer_ to program in English, since it feels to them like a self-contained "programming" way of thinking and speaking. (They were incredibly talented developers, by the way.)
Roy Tinker
CC BY-SA 4.0
2024-01-30T16:35:44.890Z
@RoyTinker Excel uses localized function names, and it's always "fun" to have to figure out how they've decided to call VLOOKUP in Polish (it's WYSZUKAJ.PIONOWO if you're curious - and you thought T_PAAMAYIM_NEKUDOTAYIM was bad...). To me it's not so much "programming mode" as "there's so much English in software development that it's easier to fully switch over than constantly switch your brain between two languages".
Maciej Stachowski
CC BY-SA 4.0
2024-01-31T03:57:58.593Z
@IMSoP  I'm going to steal your `d'ocumentation`. I'll be using it from now on :)
slebetman
CC BY-SA 4.0
2024-01-31T04:15:36.770Z
I imagine there are far more resources on the internet about Excel macros in English than in other languages.
qwr
CC BY-SA 4.0
2024-01-31T04:18:17.243Z
I don't think English being the lingua franca is historical accident, since the amount of computing research reflects the global power of the US and UK.
qwr
CC BY-SA 4.0
2024-01-31T07:29:08.547Z
@qwr Sure, but the fact that Computer Science was developed at a time when they had that power is essentially coincidence. What I'm getting at is there's nothing about *the language itself* that makes it uniquely suited to expressing computer programs.
IMSoP
<p>Historical roots.  Much early development of computers and programming languages was done in English-speaking countries.  <a href="https://simple.wikipedia.org/wiki/ENIAC" rel="noreferrer">ENIAC</a> and <a href="https://en.wikipedia.org/wiki/UNIVAC" rel="noreferrer">UNIVAC</a> were American.  The <a href="https://en.wikipedia.org/wiki/Manchester_Mark_1" rel="noreferrer">Manchester Mark 1</a> was British.  <a href="https://en.wikipedia.org/wiki/Fortran" rel="noreferrer">Fortran</a>, <a href="https://en.wikipedia.org/wiki/COBOL" rel="noreferrer">COBOL</a>, <a href="https://en.wikipedia.org/wiki/Lisp_(programming_language)" rel="noreferrer">Lisp</a>, and <a href="https://en.wikipedia.org/wiki/BASIC" rel="noreferrer">BASIC</a> were all developed in the United States.  <a href="https://en.wikipedia.org/wiki/ALGOL" rel="noreferrer">ALGOL</a> was the first significant international collaboration, but by then the USA was dominating the industry.</p>
<p>And once English became the <em>lingua franca</em> of the computing industry, developers from different linguistic backgrounds also designed programming languages in English, for the sake of having a global standard.  <a href="https://en.wikipedia.org/wiki/Guido_van_Rossum" rel="noreferrer">Python's BDFL</a> may be Dutch, but Python's <em>keywords</em> and standard library are named in English, because that's what's familiar to programmers.</p>
<p>Also, English has some <em>technical</em> advantages for designing a programming language, compared to other human languages:</p>
<ul>
<li>English has a simple alphabetic writing system.  (True, English is infamous for its orthography not accurately representing its <em>pronunciation</em>, but that's irrelevant when typing source code to be processed by a computer.)  It can be written in 7-bit ASCII, with the rare “decorative” diacritics simply ignored.  We don't have thousands of characters like in Chinese or Japanese.  We don't have context-dependent letter shapes like Arabic.  We don't need support for bidirectional text.  That makes character encoding and font support straightforward.</li>
<li>English has relatively little grammatical inflection.  For example, you can give an instruction to “print this text”, and the form of that command doesn't depend on whether you're talking to a man, a woman, a group of multiple people, or an inanimate object like a computer.  So in a programming language, you can just name a function <code>print</code>, without caring which “gender” your computer, printer, or text is.</li>
</ul>

CC BY-SA 4.0
2024-01-29T18:10:40.600Z
2024-01-29T18:10:40.600Z
dan04
CC BY-SA 4.0
2024-01-29T19:28:46.533Z
Can you give an example where inflection might be needed? This escapes my imagination, probably because I speak non of the other languages you mention. In my (English) programming, this only ever came up when pluralising variable names (and English already has some weird plurals).
Bergi
CC BY-SA 4.0
2024-01-29T20:21:21.860Z
@Bergi: Arabic is one such language.  The imperative form of “print” can be *atabae* (to a man), *atabei* (to a woman), *atabaeuu* (to a group of men), or *aitabaeuu* (to a group of women).   Spanish doesn't have *gendered* imperatives, but still distinguishes formality and plurality with *imprime* (tú), *imprima* (usted), and *impriman* (ustedes).
dan04
CC BY-SA 4.0
2024-01-31T16:14:37.193Z
Good point about English having some objective linguistic advantages. The technical term for your last paragraph is that English is more ["analytic"](https://en.wikipedia.org/wiki/Analytic_language) than many languages; although it is not completely analytic, e.g. nouns vary to indicate plural vs singular.
IMSoP
CC BY-SA 4.0
2024-02-01T18:27:49.300Z
"Professor, the program is refusing to compile on my computer"

"Have you addressed it with the correct pronouns?"
Seggan
<h1>The influence of momentum</h1>
<p>The first &quot;compiled&quot; programming language was Autocode, developed at the University of Manchester in England in 1952. The first <em>widely used</em> programming language, FORTRAN, was developed at IBM in 1957, in the USA. The first example of a non-English programming language I can find is the ALGOL 68 standard, which was published in several European languages, and eventually Japanese.</p>
<p>By this time, however, the USA and UK had already established themselves as the pioneers of programming language development, with languages like LISP, BASIC, COBOL, and ALGOL58. From there, every notable language was in English because the people who made them spoke (possibly amongst other things) English. If you want your language to be both useful and popular (as many do), it makes sense to target the demographic with the largest chance of using your language; for a long time, this was English[1], and even as countries like India and China have become large centers of development in the tech world, this continues to be English. I have no doubt that at some point we will see a popular non-English language, but momentum rolls on.</p>
<p>[1]: By &quot;English&quot;, I mean &quot;People willing to program in English&quot;</p>

CC BY-SA 4.0
2024-01-28T05:40:09.020Z
2024-01-28T05:40:09.020Z
blueberry
CC BY-SA 4.0
2024-01-28T20:30:23.343Z
Along with all this, I think it's worth noting that it doesn't seem particularly hard for a lot of people without English fluency to learn to program using English keywords. One of my favorite languages, Ruby, originates in Japan, has many Japanese-speaking maintainers and users with limited-to-no English skills, and has better and more comprehensive official docs in Japanese than English as well as lots of cool Japanese books on the language that don't get translations, but still it uses English keywords. I think this makes it easy for the intertia/tradition of English to win out.
Zoë Sparks
CC BY-SA 4.0
2024-01-29T02:52:43.897Z
A lot of the english keywords, like `for...in` or `do...while` actually have much more limited scope in meaning than in English, where a word could have 20 different meanings.
qwr
CC BY-SA 4.0
2024-01-29T03:53:46.270Z
@ZoëSparks great point, I'm sure I could learn to program with keywords like nachat and yesli as long as I get to use English for identifiers. The fact that most operations are symbolic helps too
Seggan
CC BY-SA 4.0
2024-01-29T16:06:22.177Z
@ZoëSparks Hasn't Japan required children to learn English in school for decades? By the time Ruby was developed, I'd expect most programmers to have gone to school with that requirement. Even if they're not "fluent", they would be familiar enough to understand the programming words.
Barmar
CC BY-SA 4.0
2024-01-29T21:51:37.373Z
@Barmar Yes, but (having lived there as an exchange student on homestay + attended high school, and having spent lots of time on Ruby bug trackers and mailing lists and reading Japanese-language blog posts and books and things about it) I can say that English proficiency among adults there varies widely. It's a bit like Spanish knowledge among Anglos in my home state of Texas: most learn some in school, and a few attain fluency, but as adults many recall only a few words or simple phrases even if they took classes in school for years. Many people around the world know that much English.
Zoë Sparks
CC BY-SA 4.0
2024-01-29T21:57:48.933Z
@ZoëSparks OK. I've never been to Japan, but from the media I've gotten the impression that lots of pop culture is in English.
Barmar
CC BY-SA 4.0
2024-01-29T21:59:25.303Z
See also: https://en.wikipedia.org/wiki/Network_effect
JimmyJames
CC BY-SA 4.0
2024-01-29T22:10:50.563Z
@qwr A good example of that is that 'if' in every language I've ever used is the equivalent of "if and only if" (aka: 'iff') in general English.  Another is that 'or' would commonly be 'and/or',
JimmyJames
# Why is almost every programming language made in English?
Posted by: username_0 on 2024-01-28
Every programming language I know (Java, C++, C#, Python, etc.) are all made in English. That is, you can't, for example, type `imprimir("hola")` instead of `print("hi")`. You have to use English words for all programming keywords.

Why are almost all programming languages based on English?
**Tags:** syntax language-design
> **Comments:**
> **username_1**: [List of counterexamples](https://en.wikipedia.org/wiki/Non-English-based_programming_languages), although I still think the question is a great one. Welcome to PLDI!  
> **username_2**: The question is essentially answered in the first paragraph of the above Wikipedia page.  
> **username_2**: @SlightlyPsychotic While there are many counterexamples, none of them have anything near the popularity of the English-based languages. I'd guess that 99% of software is written in less than 10 languages, and they're all English. And the reason is likely that most development of computers and programming languages occurred in English-speaking countries (primarily US and UK), and in the last 50 years English has become the lingua franca of the global economy.  
> **username_3**: You can allow most programming languages to utilise almost any other language by the use of 'libraries" or equivalent.  
> **username_4**: They were developed during the American Century, many of them by the U.S. government itself.A huge number of leading computer scientists and software engineers were monolingual English-speakers.  
> **username_5**: Not an answer in itself, sure, but don't forget to consider that very many languages, although using the Latin alphabet, have accented letters in addition to the base 26. And early computers didn't have those, not even uppercase and lowercase, just the base Latin letters, digits and the rest.  
> **username_6**: Microsoft Excel went a different way, and it's extremely frustrating, because if I have a simple table with a simple SUM in it, if I open it on a version of Windows with a different language, it does not work, because it expects the local language's word for the sum.  
> **username_7**: @JohnDoe I'm pretty sure that is not because Italian is special, but rather because the Wikipedia list is not exhaustive. There's [itaco](https://github.com/luca3m/itaco), [ruggine](https://github.com/DamianX/ruggine), [italian ruby](https://github.com/Pluvie/italian-ruby), [latin perl](https://metacpan.org/pod/Lingua::Romana::Perligata), …  
> **username_8**: If I wanted to create a new programming language that should be widely used, I'd ask myself what language most people probably prefer. Country A people speak language A and most of them English, country B people speak B and most of them English and so on... so that would be my choice too.  
> **username_9**: Just want to make it clear that only the keywords have to be in English (and in some languages like C or Perl most of the keywords are in fact syntax marks, not words). There's nothing stopping you from writing a "Hola Mundo" program in Basic.  `print ("Hola Mundol!")`  
> **username_10**: We tried it in Visual Basic 3 or 4, I don't recall which. Since the code was stored as a token sequence, we would detect if the user was running, say, French Windows and display the code using French functions and keywords. It was a NIGHTMARE for testing and even worse for documentation, and users didn't really want or need it. Non-native speakers of English adapt quickly to the keywords.  
> **username_10**: That whole feature set got cut but all the gear for supporting it still existed in OLE Automation, and so when I was working on VBScript and JScript in the 1990s we had to test for all these scenarios where a late-bound dispatch might have different behaviours depending on locale. Again, it was a nightmare. A huge amount of work for me for absolutely no practical user benefit.  
> **username_11**: Ada Lovelace was English and so was Alan Turing. Maybe the English were bored enough to dream up a computer :)  
> **username_12**: Because this might happen: [Why can't my program compile under Windows 7 in French?](https://stackoverflow.com/q/22780466/2821954) (note: April Fools joke).  
> **username_13**: This is but a small example of a general trend of favoring English. In the scientific world, if a paper is not published in English it is as good as not existing. There are counterexamples of course. Einstein published a lot of his early work in German. Then again, most of the top theoretical physicists and chemists at the time were German. But generally it is still true. There's even a historical trend of theories and proofs "discovered" by being translated from its original language into English. All the top scientific journals are in English  
> **username_14**: The English speaking [British Empire](https://www.google.com/search?q=how+english+became+a+global+language) had a little something to do with it.  
---
## 8 answers
### Answer by username_25 on 2024-01-28. Score: 30 | Accepted answer
I think the primary reason for this is the same that motivates any other [*lingua franca*](https://en.wikipedia.org/wiki/Lingua_franca): the desire to exchange ideas *across* different groups.

We can group the places where natural language is used in programming into a few different categories:

1. **Keywords** - terms baked into the syntax of the language ("if", "return", "while", etc). These are what linguists would call [a "closed word class"](https://en.wikipedia.org/wiki/Part_of_speech#Open_and_closed_classes); they may be reserved from use as identifiers, or marked out with [stropping](https://en.wikipedia.org/wiki/Stropping_(syntax)).
2. **Built-in identifiers** - names of functions, namespaces, classes, etc, which are part of the "standard library" of the language. These are generally an "open class", in the sense that new items are added reasonably regularly, and can move somewhat freely between this and the next category.
3. **User-defined identifiers** - this is the much largest list, and also the one over which languages designers have least direct influence. The main limitation placed is the available *character set* - if identifiers can only use the Latin letters in ASCII, some languages will be harder to use (though not impossible).
4. **Error messages** and other output. This generally depends not on the *design* of the language, but its *implementation*. These may be the same thing (e.g. PHP has only one widely used implementation), or entirely separate and widely varied (e.g. C compilers).
5. **Documentation**. On the face of it, this is the *easiest* to translate, and for example [the PHP manual is currently "fully" translated into 9 languages](https://www.php.net/docs.php).

Of these, the vast majority of code that looks like language is **user-defined identifiers**. These can be, and regularly are, written in the user's first language - **except when they're shared**. If a new online service wants to publish an SDK on a package repository such as CPAN, NPM, Packagist, Nuget, etc, they need to define a *public API* for that package, and that involves choosing identifiers. If the majority of packages on that repository use identifiers in the same language, that is a *lingua franca* in exactly the same way as the trade languages of the ancient Mediterranean, or the Latin of Renaissance scientists.

This then leads back to the choice of **built-in identifiers**. The language designer could, in principle, provide multiple aliases for every built in function, giving the user a choice of languages. However, this becomes a wasted effort if the user community picks one as the *lingua franca* for sharing code samples and libraries.

As we get deeper into the core of the language, and particularly with **keywords**, we get a similar effect *between* languages: if you want new users to pick up your language, there is an advantage to them recognising parts of it. This leads to certain terms becoming somewhat standardised in their meaning - the *lingua franca* is *based on* a particular natural language, but becomes its own thing. For instance, the "return" keyword originated from the *intransitive* English verb meaning "go back", but has acquired programming-specific meanings: "returned value", "return type", and so on.

To circle back to **error messages** and **documentation**, like private identifiers these can be and often are translated; but they will still have to incorporate large parts of the *lingua franca*, to mention keywords and identifiers which are *not* translated.

All of that leaves us with a few situations where *not* using the *lingua franca* would be reasonable:

* Where the language has no "open word class". For instance, Microsoft Excel has localized names for all its built-in formula functions.
* Where the language isn't intended for writing code to share. The biggest example of this is educational languages: the main aim is to make it easy for users to write their own programs, to learn programming concepts.
* Where the audience for the language is limited to a particular community. The macro language of an internal tool might exclusively use the local language of its developers, although the draw of the *lingua franca* will still be there from exposure to other languages.

Throughout this, I've deliberately talked about the *lingua franca* in the abstract, because the fact that it is based on English is largely historical accident: English was the language in the UK and USA where major early computer science work happened; and it's also a *lingua franca* in other contexts, meaning it is *accessible* to a lot of users as a second language.
> **Comments:**
> **username_7** (2024-01-28): I think you forgot "comments" and "application/library documentation"  
> **username_25** (2024-01-28): @Bergi True; I guess d"ocumentation" can be broken down almost in parallel to code: core language documentation, third-party public API documentation, and internal documentation such as comments.  
> **username_26** (2024-01-29): I've worked with native Russian speakers who say they _prefer_ to program in English, since it feels to them like a self-contained "programming" way of thinking and speaking. (They were incredibly talented developers, by the way.)  
> **username_27** (2024-01-30): @RoyTinker Excel uses localized function names, and it's always "fun" to have to figure out how they've decided to call VLOOKUP in Polish (it's WYSZUKAJ.PIONOWO if you're curious - and you thought T_PAAMAYIM_NEKUDOTAYIM was bad...). To me it's not so much "programming mode" as "there's so much English in software development that it's easier to fully switch over than constantly switch your brain between two languages".  
> **username_13** (2024-01-31): @IMSoP  I'm going to steal your `d'ocumentation`. I'll be using it from now on :)  
> **username_22** (2024-01-31): I imagine there are far more resources on the internet about Excel macros in English than in other languages.  
> **username_22** (2024-01-31): I don't think English being the lingua franca is historical accident, since the amount of computing research reflects the global power of the US and UK.  
> **username_25** (2024-01-31): @qwr Sure, but the fact that Computer Science was developed at a time when they had that power is essentially coincidence. What I'm getting at is there's nothing about *the language itself* that makes it uniquely suited to expressing computer programs.  
---
### Answer by username_29 on 2024-01-28. Score: 36
# The influence of momentum

The first "compiled" programming language was Autocode, developed at the University of Manchester in England in 1952. The first *widely used* programming language, FORTRAN, was developed at IBM in 1957, in the USA. The first example of a non-English programming language I can find is the ALGOL 68 standard, which was published in several European languages, and eventually Japanese.

By this time, however, the USA and UK had already established themselves as the pioneers of programming language development, with languages like LISP, BASIC, COBOL, and ALGOL58. From there, every notable language was in English because the people who made them spoke (possibly amongst other things) English. If you want your language to be both useful and popular (as many do), it makes sense to target the demographic with the largest chance of using your language; for a long time, this was English[1], and even as countries like India and China have become large centers of development in the tech world, this continues to be English. I have no doubt that at some point we will see a popular non-English language, but momentum rolls on.

[1]: By "English", I mean "People willing to program in English"
> **Comments:**
> **username_30** (2024-01-28): Along with all this, I think it's worth noting that it doesn't seem particularly hard for a lot of people without English fluency to learn to program using English keywords. One of my favorite languages, Ruby, originates in Japan, has many Japanese-speaking maintainers and users with limited-to-no English skills, and has better and more comprehensive official docs in Japanese than English as well as lots of cool Japanese books on the language that don't get translations, but still it uses English keywords. I think this makes it easy for the intertia/tradition of English to win out.  
> **username_22** (2024-01-29): A lot of the english keywords, like `for...in` or `do...while` actually have much more limited scope in meaning than in English, where a word could have 20 different meanings.  
> **username_1** (2024-01-29): @ZoëSparks great point, I'm sure I could learn to program with keywords like nachat and yesli as long as I get to use English for identifiers. The fact that most operations are symbolic helps too  
> **username_2** (2024-01-29): @ZoëSparks Hasn't Japan required children to learn English in school for decades? By the time Ruby was developed, I'd expect most programmers to have gone to school with that requirement. Even if they're not "fluent", they would be familiar enough to understand the programming words.  
> **username_30** (2024-01-29): @Barmar Yes, but (having lived there as an exchange student on homestay + attended high school, and having spent lots of time on Ruby bug trackers and mailing lists and reading Japanese-language blog posts and books and things about it) I can say that English proficiency among adults there varies widely. It's a bit like Spanish knowledge among Anglos in my home state of Texas: most learn some in school, and a few attain fluency, but as adults many recall only a few words or simple phrases even if they took classes in school for years. Many people around the world know that much English.  
> **username_2** (2024-01-29): @ZoëSparks OK. I've never been to Japan, but from the media I've gotten the impression that lots of pop culture is in English.  
> **username_31** (2024-01-29): See also: https://en.wikipedia.org/wiki/Network_effect  
> **username_31** (2024-01-29): @qwr A good example of that is that 'if' in every language I've ever used is the equivalent of "if and only if" (aka: 'iff') in general English.  Another is that 'or' would commonly be 'and/or',  
---
### Answer by username_28 on 2024-01-29. Score: 10
Historical roots. Much early development of computers and programming languages was done in English-speaking countries. [ENIAC](https://simple.wikipedia.org/wiki/ENIAC) and [UNIVAC](https://en.wikipedia.org/wiki/UNIVAC) were American. The [Manchester Mark 1](https://en.wikipedia.org/wiki/Manchester_Mark_1) was British. [Fortran](https://en.wikipedia.org/wiki/Fortran), [COBOL](https://en.wikipedia.org/wiki/COBOL), [Lisp](https://en.wikipedia.org/wiki/Lisp_(programming_language)), and [BASIC](https://en.wikipedia.org/wiki/BASIC) were all developed in the United States. [ALGOL](https://en.wikipedia.org/wiki/ALGOL) was the first significant international collaboration, but by then the USA was dominating the industry.

And once English became the *lingua franca* of the computing industry, developers from different linguistic backgrounds also designed programming languages in English, for the sake of having a global standard. [Python's BDFL](https://en.wikipedia.org/wiki/Guido_van_Rossum) may be Dutch, but Python's *keywords* and standard library are named in English, because that's what's familiar to programmers.

Also, English has some *technical* advantages for designing a programming language, compared to other human languages:

* English has a simple alphabetic writing system. (True, English is infamous for its orthography not accurately representing its *pronunciation*, but that's irrelevant when typing source code to be processed by a computer.) It can be written in 7-bit ASCII, with the rare “decorative” diacritics simply ignored. We don't have thousands of characters like in Chinese or Japanese. We don't have context-dependent letter shapes like Arabic. We don't need support for bidirectional text. That makes character encoding and font support straightforward.
* English has relatively little grammatical inflection. For example, you can give an instruction to “print this text”, and the form of that command doesn't depend on whether you're talking to a man, a woman, a group of multiple people, or an inanimate object like a computer. So in a programming language, you can just name a function `print`, without caring which “gender” your computer, printer, or text is.
> **Comments:**
> **username_7** (2024-01-29): Can you give an example where inflection might be needed? This escapes my imagination, probably because I speak non of the other languages you mention. In my (English) programming, this only ever came up when pluralising variable names (and English already has some weird plurals).  
> **username_28** (2024-01-29): @Bergi: Arabic is one such language.  The imperative form of “print” can be *atabae* (to a man), *atabei* (to a woman), *atabaeuu* (to a group of men), or *aitabaeuu* (to a group of women).   Spanish doesn't have *gendered* imperatives, but still distinguishes formality and plurality with *imprime* (tú), *imprima* (usted), and *impriman* (ustedes).  
> **username_25** (2024-01-31): Good point about English having some objective linguistic advantages. The technical term for your last paragraph is that English is more ["analytic"](https://en.wikipedia.org/wiki/Analytic_language) than many languages; although it is not completely analytic, e.g. nouns vary to indicate plural vs singular.  
> **username_1** (2024-02-01): "Professor, the program is refusing to compile on my computer"

"Have you addressed it with the correct pronouns?"  
---
### Answer by username_15 on 2024-01-28. Score: 6
For English I assume it means a global language. For why English has become a global language, I think it's more of a question about history, instead of PLDI. Here I answer why a programming language would choose keywords from a global language.

Firstly, as Seggan commented, there are a lot of programming languages using other natural languages. But it is much less likely someone would get to know a programming language not in either English or their first language. If you use English, you have a much broader user base, that could potentially get your language much more popular. If someone wants a broader user base, they would also choose English. So, in the end, the most popular programming languages you have known are in English.

I think there are only two alternatives for this purpose. One is to make it multilingual.

There were some animation makers and game designers that had a way to make easy programs using a GUI list of commands, and the commands tend to be translated. It's easy because the translation doesn't change how the code is stored, but only how they are displayed. But users switch to the traditional way quickly, because the graphical way usually only support a restricted set of features, and the editor isn't very easy to use. Better examples on this direction would be Scratch-like languages. I don't know Scratch much, but I think it's much more powerful than the GUI lists, but still not as powerful as modern advanced languages.

The obvious problem of supporting multiple languages in traditional text programs, is the identifier names could easily conflict with keywords or system libraries in a language that the programmer doesn't know, or not even existed before the program has created. It might be better if the programmer chooses the language. But there is another problem, that translations tends to be slower than the original release, and if it's not the original developer making all the decisions, sometimes translations are bad and are subject to change, which would be very undesirable to use in a programming language. The programmers could use English before the translations are stable, but they would still have to learn the English version, adding more difficulty to just use English, and they would need an automatic translator to change the language afterwards. A potentially better way would be like the GUI lists, that only translate the words in the editor. In either case, I think they are not considered reliable operations for program source code, especially with eval and homonyms in consideration.

But I don't think these difficulties are absolutely unsolvable. Maybe someone could come up with some clever ideas. And they could start from languages that least likely conflict with English. I think the real problem is, keywords are not the only thing in a programming language. Documentation and libraries matter more. A translated programming language is of no use, if there are not documentations at all. And not many language designers had the resources to maintain documentations in that many languages. Library writers usually had less resources. That also answers why there had to be a popular programming language, instead of everyone using their own programming language in their own country: Actually there is not much reason for a programming language. You could do it if you had enough funds. But the reason is strong for libraries, and languages don't affect that much without libraries. A possible middle ground is, make everyone use their own language internally in a project, and export the symbols in English, to make a library popular, cost-effective, and non-English. But it might be difficult for us to know it is the case.

TL; DR: The majority of libraries would support only one language, and you'll not know it if it is not English. Programming languages doesn't contribute much to the whole picture, but have extra difficulties, that may not worth it.

Another way is to use symbols, like APL. But that only applies for a small set of builtins. They still have to use words in natural languages if there are a lot of libraries.

Also note that while programming languages borrow words from natural languages, they are not the same. Some words like "for" "yield" are too generic but have gained much more specific meaning. But they may not affect translation.

### Survey about the documentation languages in some programming language's homepage

Python has English, Spanish, French, Japanese, Korean, Brazilian Portuguese, Turkish, Simplified Chinese, Traditional Chinese, 8 or 9 languages

PHP has English, Brazilian Portuguese, Chinese (Simplified), French, German, Japanese, Russian, Spanish, Turkish, 9 languages

Rust has English (en-US), Español (es), Français (fr), Italiano (it), 日本語 (ja), Português (pt-BR), Русский (ru), Türkçe (tr), 简体中文 (zh-CN), 正體中文 (zh-TW), 9 or 10 languages

Ruby has Български, Deutsch, English, Español, Français, Bahasa Indonesia, Italiano, 日本語, 한국어, polski, Português, Русский, Türkçe, Tiếng Việt, 简体中文, 繁體中文, 15 or 16 languages

C# has Bahasa Indonesia, Bahasa Melayu, Bosanski, Català, Čeština, Dansk, Deutsch (Österreich), Deutsch (Schweiz), Deutsch, Eesti, English (Australia), English (Canada), English (India), English (Ireland), English (Malaysia), English (New Zealand), English (Singapore), English (South Africa), English (United Kingdom), English (United States), Español (México), Español, Euskara, Filipino, Français (Belgique), Français (Canada), Français (Suisse), Français, Gaeilge, Galego, ქართული, Hrvatski, Íslenska, Italiano (Svizzera), Italiano, Latviešu, Lëtzebuergesch, Lietuvių, Magyar, Malti, Nederlands (België), Nederlands, Norsk Bokmål, Polski, Português (Brasil), Português (Portugal), Română, Slovenčina, Slovenski, Srbija - Srpski, Suomi, Svenska, TiếngViệt, Türkçe, Ελληνικά, Български, қазақ тілі, Русский, Српски, Українська, עברית‏,‎ العربية, हिंदी, ไทย, 한국어, 中文 (简体), 中文 (繁體), 中文 (繁體 香港特別行政區), 日本語, 48 or 69 languages

Scratch (user languages) has Аҧсшәа, Afrikaans, العربية, አማርኛ, Aragonés, Asturianu, Azeri, Bahasa Indonesia, বাংলা, Беларуская, Български, Català, Česky, Cymraeg, Dansk, Deutsch, Eesti, Ελληνικά, English, Español (España), Español Latinoamericano, Esperanto, Euskara, فارسی, Filipino, Français, Frysk, Gaeilge, Gàidhlig, Galego, 한국어, Hausa, Հայերեն, עִבְרִית, हिंदी, Hrvatski, isiXhosa, isiZulu, Íslenska, Italiano, ქართული ენა, қазақша, Kichwa, Kiswahili, Kreyòl ayisyen, Kurdî, کوردیی ناوەندی, Latviešu, Lietuvių, Magyar, Māori, Монгол хэл, Nederlands, 日本語, にほんご, Norsk Bokmål, Norsk Nynorsk, Occitan, ଓଡ଼ିଆ, Oʻzbekcha, ไทย, ភាសាខ្មែរ, Polski, Português, Português Brasileiro, Rapa Nui, Română, Русский, Sepedi, Setswana, Slovenčina, Slovenščina, Српски, Suomi, Svenska, Tiếng Việt, Türkçe, Українська, 简体中文, 繁體中文, 76 or 80 languages
> **Comments:**
> **username_7** (2024-01-28): I think most of the C# documentation is automatically translated, and rather badly. It's almost always better to read the original English one.  
> **username_16** (2024-01-29): "简体中文, 繁體中文,": ["Oh, we got both kinds: Country *and* Western!"](https://youtu.be/vS-zEH8YmiM?t=28)  
> **username_15** (2024-01-29): @Peter-ReinstateMonica That's the reason for the "a or b languages". C# has 10 kinds of English which I doubt they all have some differences.  
> **username_15** (2024-01-29): @Bergi And that means serious translated documentations of a traditional language would be much less likely to have a number that matches Scratch.  
> **username_17** (2024-01-29): ALGOL-68 should be mentioned for keywords, since keywords were technically in no language; the language had an if operator, and a compiler had to represent that in some way different from a variable spelled if or se, usually in quote marks, as ''if'' or ''se'' or ''если''.  
> **username_18** (2024-01-29): Goal for translation, automatic or not, should be that the average native speaker of the language understands the translation better than the untranslated original. That is very often not the case. Once had a video recorder with German manual that mentioned a button for saving the light of the day (in German). I had to translate it back into English to figure out it was daylight saving time (DST). In proper German it is just “summertime” vs “wintertime”.  
---
### Answer by username_19 on 2024-01-29. Score: 5
The basic explanation is firstly that English is a widely spoken language around the world, and secondly that most computer technology has originated and continues to originate from America, where they speak English.

Moreover, post-WW2 America became a centre in the world for scientific research of all kinds, so that the technology doesn't just originate in America but so do a lot of the ideas, terminology, and standards, and the academic institutions that gestate them.

Scale is important too. Not only does America itself speak English, but so do a number of its major allies and trading partners who have equally advanced economies with demand for computerisation. This means that a large mass of English-speaking professional workers, and technical artefacts and tooling in English, have already been accumulated, completely dwarfing what was ever available in any other language.

So if a company wants development done today, the biggest pool of resources are in English. Even if you hire developers who speak a local language, they are likely to have to also speak English to access the existing resources just to learn their trade in the first place, let alone continue to practise it commercially.

Since the internet, there is also a huge "hive mind" of practitioners worldwide who can be consulted on difficult problems. These practitioners are either native English, or speak English as a lingua franca. This means practitioners have to carry on speaking proficient English regularly in order to consult with this hive mind.

Once all that investment is sunk in English-centric learning and speaking, there's usually very little to be gained, commercially, from diverting things back to the local language.

Only nation states with a political policy on language, and with an enormous commitment of economic resources, could really hope to challenge this dominance of English, but none yet have seen fit to do so.
---
### Answer by username_24 on 2024-01-29. Score: 3
Many programming languages inherit reserved words such as if, else, and while from other programming languages, with semantics that are also inherited from those other languages, rather than from English per se.  If a programming language were to have reserved words providedThat and asLongAs, and the semantics of construct like:
asLongAs (x < y)
{      
  providedThat (func(x) > 3)
  {
    action2();
  }
  action3();
}

were intended to match those of C's while and if constructs, the use of asLongAs and provitedThat instead of while and if would make the meaning less clear, even to people who would have no trouble understanding the English meaning of the phrases "as long as" and "provided that".  If someone who spoke a different human language were to have it use that language's phrasing for "while" and "if", the same issues would apply.
If a programming language is going to have some reserved words that correspond with English-based reserved words that exist in other language, basing other reserved words on English words or phrases would generally make code seem more consistent than arbitrarily mixing in foreign words.  If, however, a human language had a single word that would naturally describe a concept that would take multiple words in English, a programming language might benefit from using that word, especially if the single word would fit the semantics of the construct better than any practical English-language phrasing.
---
### Answer by username_16 on 2024-01-29. Score: 1
America has been the center of technology in general and computer related technologies in particular since the second world war.

The first decades after the war coincide with the development of the first widely used programming languages, which consequently happened in America or in international teams with American participation, in English, without giving it much thought. Most people working in the field speak enough English to at least read programs with English keywords and basic documentation, which made it easy for them to latch onto that development (surely easier than, say, a development in Mandarin, Spanish or Hindi, to name other widely used languages.)

Obviously, that made English a great choice for keywords in newly conceived languages, even though for the past 10 or 20 years the number of programmers whose mother tongue is Mandarin may have been larger than the number of those with English mother tongue. Close to nobody outside Asia speaks Mandarin; almost everybody with a college education speaks some basic English. English is the *lingua franca.*

And then there is great value in knowing the meaning of "for loop", "if clause", "assignment" or "statement"; computer science has developed a jargon much like medicine or jurisdiction which makes communication efficient and clear. Any non-English implementation would need a glossary with definitions which most likely would have to refer to the English originals in any case.
> **Comments:**
> **username_16** (2024-01-29): @12431234123412341234123 I'll translate your comment for the general public: "It is simply wrong that America has been the center of computer related technology since the 1950s -- Taiwan would be a better candidate (today, not 1950)." It's possible that the U.S. has lost their dominating position recently -- in 2022, for the first time in decades, IBM did not file most IT patents (Samsung did). But the current contender would probably be Korea (with Samsung and LG), not Taiwan. In other metrics (labor force, revenue) I suppose the U.S. is still ahead of the tigers.  
> **username_20** (2024-01-29): As mentioned on the main question, [content on non-language-focused StackExchange sites is required to be written in English](https://meta.stackexchange.com/a/13684/391137). Therefore, any further non-english comments on this answer will be deleted.  
> **username_21** (2024-01-31): [Citation Needed], whilst I agree that America has had some impact on the computing world, this seems to completely ignore the efforts of British companies, notably Dennis Ritchie, Creator of C.  
> **username_22** (2024-01-31): @ATaco from my brief reading, it looks like Ritchie did all his research work at Bell Labs in New Jersey?  
> **username_21** (2024-01-31): @qwr Oops, that he did. I got my Bell Labs confused  
> **username_16** (2024-01-31): @ATaco All countries have their eminent CS pioneers (Turing, Zuse) -- but in the end it was all U.S. centered. They were simply the technologically most advanced country in the post-WWII 20th century,  
---
### Answer by username_23 on 2024-01-29. Score: 1
There are real problems with compatibility once one steps outside of "ASCI and related territories".

The best example I know is [LaTeX](https://en.wikipedia.org/wiki/LaTeX): it is technically a language for typesetting mathematics, not a programming language proper.

Now, any LaTeX document containing an "Umlaut", i.e. ä instead of "a, does not always compile for non-German users. Same for French accents, Spanish tilde, etc. This problem is exponentially worse when a non-Latin alphabet is used. I recall being unable to get "LaTeX in Japanese" going on my mac as late as 2010. In turn, simply printing PDFs produced by standard LaTeX on a Japanese printer, was already a challenge.

I also recall the *Underhanded C contest* making use of similar-but-different letters to introduced security holes. This would be much
worse if there was not "Standard English".
> **Comments:**
> **username_22** (2024-01-31): the attack described in the last paragraph is called script spoofing: https://en.wikipedia.org/wiki/IDN_homograph_attack  
> **username_22** (2024-01-31): From what I remember, PdfLaTeX was notoriously difficult for supporting other scripts, while XeTeX and LuaTeX, Unicode characters work perfectly fine. https://tex.stackexchange.com/questions/618009/is-there-any-reason-to-prefer-a-unicode-symbol-versus-its-latex-command-counterp  
> **username_23** (2024-01-31): In my limited worldview, PDFLaTeX is still (most) widely used; the other ones being (much) more niche.  
---
