Is the code written in Japanese? Are filenames in English? What about like a C preprocessor? Is that still in English? Are comments in Japanese?

Examples would be nice too.

  • 7
    Just like programming in spanish/portuguese/whatever, code should always be written in english.
    – user1827
    Feb 10, 2011 at 19:39
  • 1
    @M28 It's a bit different though when you have to use a foreign alphabet. Try to write a simple hello world app using the Greek alphabet for all the keywords.
    – biziclop
    Feb 10, 2011 at 19:42
  • 3
    @M28: Just out of curiosity: are there any programming languages that have been designed for characters outside the latin alphabet? And if compilers allow for encodings other than ASCII, I guess even Java could be written with all symbols in Japanese, except for language keywords... Feb 10, 2011 at 19:43
  • 2
    @Frustrated: [Whitespace](en.wikipedia.org/wiki/Whitespace_(programming_language) comes to mind.
    – Josh K
    Feb 10, 2011 at 19:44
  • 3
    @Frustrated: Wikipedia knows everything.
    – user7043
    Feb 10, 2011 at 19:46

2 Answers 2


As someone who has programmed in Japan. I can honestly say that I have seen code in all forms. Most of the cleaner code that I have seen that was intended to be supported only by Japanese programmers had all of the comments and documentation in Japanese.

As for some of the horrendous code that I have seen, I remember seeing Java and (I believe) VB code that actually used kanji or katakana for variable names.

That aside, code tends to look like this

 * これはクラスのコメント
public class FooClass implements Fooable {

     * オブジェクトのインスタンスを作成する
    public FooClass() {



As for a C preprocessor, I have no idea.

  • A preprocessor could be used to translate language keywords to other languages. Feb 10, 2011 at 19:55
  • 4
    So is "Foo" an actual English word like "BankClass" or or is romanized?
    – Zeno
    Feb 10, 2011 at 20:02
  • 2
    Like, would they call FooClass BankClass or GinkouKurasu? Feb 24, 2014 at 18:55
  • 1
    I know, but in the real world, would they be more inclined to use Bank or Ginkou? Aug 26, 2015 at 20:14
  • 3
    @Panzercrisis, that depends on the whims and policies of the developer or team. As I mentioned in my answer, my wife's code tends to use English words in declarations, but she might use the words differently than I would typically interpret them. I don't think there's any one pattern that's dominant. But I'd bet that a developer who is only familiar with the Japanese word for a concept would use that rather than resorting to a dictionary.
    – JasonTrue
    Mar 14, 2016 at 18:45

In practice, most programming languages in active use outside of the US use keywords that resemble English, but it's important to realize that for the most part those of us who write code as native English speakers aren't really writing in "English", either.

There are a few dozen languages that actually support non-ASCII-range keywords and these are often designed to reduce the cognitive friction for non-English speakers trying to learn programming.

Additionally, some older implementations of languages that translate code into tokens (not true compiling), can spit out the same code in an editor using the, say, German equivalent; my first experience with Microsoft Office's VBA was like this when I was a student in Germany.

Many English-like programming languages, including C#, Java, and others, now allow variable names and method names in Japanese, as long as the source code is encoded in UTF-8 or another suitable encoding. It wasn't common to have even comments in Japanese in C, however, unless you were using a compiler that supported Shift-JIS or Unicode. String literals in C were almost always escaped using the literal encoding method unless you had an external resource file format to work with, as in Visual Studio.

In practice, many programs written by Japanese teams that don't expect to require maintenance outside of Japan are written with comments or javadoc/docstrings/etc. in Japanese. My wife generally writes code with a sort of Japanese-like English, using terms that didn't necessarily match my own use or understanding of English ("regist" for "post" or "story", regist_date for publication date), and occasional comments in Japanese or Janglish.

Most programs that have an international community around them, that originate in Japan, use some form of English naming convention. See, for example, Matz' source code for ruby.

  • What if the project doesn't know if they're going to release the source outside Japan? Like a video game developed in Japan. They sometimes don't know if an English publisher will want to release the game say in the US.
    – Zeno
    Feb 10, 2011 at 20:13
  • @Zeno - That's internationalizing character strings the user will see. That's important to do even if the code is by and for English-speakers. Comments & variable names & internal language aren't really correlated unless the code is going to be released as an API.
    – G__
    Feb 10, 2011 at 20:21
  • Not really, often times video games published outside Japan will include more features so the code is directly changed too. Like Final Fantasy VII included new bosses (Ruby WEAPON) in the US version but not the Japanese version.
    – Zeno
    Feb 10, 2011 at 20:33
  • Are those new features language-dependent? What's the difference versus just marketing a different feature-set in Tokyo than in Nagoya?
    – G__
    Feb 10, 2011 at 21:12
  • Like in the US, people sometimes make assumptions that their app will never be used outside of their country, and that sometimes results in code changes being necessary to release for other markets. But comments rarely need to be rewritten for localization processes if modern approaches to internationalization are used, because code is not generally touched by localizers.
    – JasonTrue
    Feb 10, 2011 at 21:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.