No, there is no barrier. A compiler is just another piece of software. Nothing stops someone from making a Fork from any compiler / interpreter, translate reserved words and eventually locate the link.
Excel for example has formulas located. Even, as far as I know, it is not possible to change the language of formulas without installing a Language Pack. Well, Microsoft at least had the decency to kill the VBA located in the years 90. The problem with macros in German, French, etc would certainly be much worse than the problem of formulas.
The implied questions are: So why isn’t this a more popular practice? Why don’t we translate and adopt languages in Portuguese?
In my view the disadvantages do not justify the advantages of localization. Returning to Excel: Try pairing with a French colleague and using Excel in laptop from him (yes, I lived it). Even if your work environment is not so globalized there are disadvantages in localization. Once you get used to Excel in Portuguese, try opening a spreadsheet in Excel in English and editing the formulas (or vice versa)... No, it’s no fun.
English is the lingua franca of computing, just as Italian is the lingua franca of music, and Latin is still heavily used today in scientific nomenclature.
While translating "if" to "if", "while" to "while", "or" to "or", etc can facilitate - to some extent - the life of a Portuguese-speaking person, I wonder if this is such a significant cognitive barrier...
On the date I wrote this reply Java has 57 reserved words, Python has 33. When we consider everything a programmer has to learn, the use of these reserved words in English seems to me a minor problem. I worked and studied for many years with very good programmers who do not speak English.
Reserved words are also just the beginning of the problem. What to do with the whole standard language library? Should we translate as well? And what to do with variable names (which may even conflict with reserved words)? What to do with literals (decimal separators, dates, etc)? We must port and translate all libraries and frameworks?
The translation of a language results in... well... another language. A language perhaps more accessible to the local community, but incompatible, when not totally inaccessible to the original community. The end result is separate ecosystems, reinvention of the wheel and a huge effort to port software between two languages.
The positive side of localization is inclusion (see Stackoverflow PT). The negative side is fragmentation.
Think of an alternate reality in which the Lua language had been created using reserved words in English. She may have found a niche, at least temporarily, in Petrobras and in the research activities of PUC do Rio. Who knows Lua would even have a foothold in other companies and national Universities. Today however very likely Lua would be a relic of the past. This hypothetical world would have missed a lot... Institutions like Adobe, Blizzard, Mozilla, NASA, etc would not have the chance to do fantastic things with a language created here in Brazil.
Source: Soen - Do there exist any compilers with localized versions of Programming Languages?
No, I even know people who are working on a version of Python in Portuguese.
– Woss
There is an important factor about not existing in so many other languages: target audience. Let’s be honest, the lingua franca after World War II became English, and a lot of the computing started with people whose mother tongue was English or in institutions that were in countries whose main language was English, thus making it an important linguistic sociological legacy in the area
– Jefferson Quesado