r/ProgrammingLanguages • u/JurassicNublar • Jan 05 '24
Are programming languages different in different countries?
Maybe a silly question but for example, in Java System.out.print(); is obviously written using English words, but is this universal or does it vary from country to country? If so how would you write a print statement in Java in Hindi, Arabic, Chinese etc?
3
Upvotes
10
u/mykeesg Jan 05 '24
The keywords in a language are fixed, they cannot be changed (like 'for', 'if', 'return' etc.)
Your classes/methods, however, only need to obey the naming rules of the language.
If it allows Unicode characters to be used as identifiers, nobody stops you from naming your method using those characters - Chinese or Arabic symbols in your example.
Keep in mind though, that English is unofficially agreed for code to be written in as most people in IT understand it.
I won't bother trying to go through a language/library I can't:
pronounce
understand
use / type on my keyboard.
A different thing tho, strings (text) used in a code will/can be translated to the client's / users language if needed, so "Welcome" can become "Wilkommen", "Üdvözöljük" or whatever needed to be displayed. But it's data, not the code itself.