3 ms·
Since most progamming languages are based on english, non-english text in string literals is almost always user-facing and should be put in resource files to ma
by samus 5y ago
Since most progamming languages are based on english, non-english text in string literals is almost always user-facing and should be put in resource files to make translation into additional languages easier.
Identifiers and comments are a serious problem though. Many application domains use terms that are tricky to translate into english. The translations could be misleading, inappropriate or not unique. Sometimes they are just plain wrong or there is no english word that fits. All of these could cause misconceptions, confusion and bugs, and make reading and working with the code and the running system harder.
- josephcsible 5y ago> Many application domains use terms that are tricky to translate into english. What if instead of translating those terms to English, you just transliterated them to the Latin alphabet?
- samus 5y agoThat works perfectly fine for German. For languages with latin-style alphabets it depends on how used people are to work with unaccented text. For some languages (for example Vietnamese[0]), the ASCII fallback modes are quite clumsy. Languages with non-latin alphabets might completely lack a standardized, widely used romanization system that works in ASCII. For Chinese and Japanese, using a romanization is not really an option. Most romanization systems are intended for academic study, as pronunciation aids and for input methods. Most varieties of Chinese have a huge number of homophones, and the romanization of such texts can be difficult to read unambiguously. [0]: https://en.m.wikipedia.org/wiki/Vietnamese_Quoted-Readable https://en.m.wikipedia.org/wiki/Vietnamese_Quoted-Readable
- qwerty456127 5y agoSo you mean you can write a program and be unable to explain what it does in plain English?
- samus 5y agoThe basic operation can be explained in English, but comments for that are potentially not as important as the implications for the application domain.