100% agree with the basic point - and the English (simplified/US) hegemony can be frustrating.
Your computer doesn't know what 'English' is - it's just a set of defined code words, and could be interchanged.
Computer languages vary considerably but actually the words used are rarely contradictory and they are a small dictionary mostly shared between many languages.
It would be nice to see something like a language abstraction layer agreed upon. Eventually this could work like you say - as long as the code is correctly written for that language variant of the syntax it would work with any interpreting software (e.g. browser) that included this facility - which would not be huge or processor intensive. But it would be a good start if in local IDEs, text editors, compilers, the user could choose to have software they are editing translated into their language, edit it, and then save out in English (US). I don't bother any more but I used to have a very simple script to idiot-check my OpenSCAD code and 'correct' centre to center, colour to color, etc... I could have it autocorrected in some text editors, but would be nice if it was more universally implemented.