Imagining an Internationalized Programming Environment

Blake Venté
3 min readJan 13, 2023

--

A radically inclusive programming paradigm.

The Problem

Your cousin wants to learn to code. Small problem: she doesn’t speak English yet. We all know CS is hard without the language barrier, so just imagine how difficult it must be when you also need to tackle learning a natural language as well.

First, I mean to say internationalization as applied to the source code itself, not the user interface produced by source code.

There was some talk of this before, localizing error messages for the linux kernel. Linus did not like that idea. He said, “There are places where localization is a good idea. The kernel is *not* one of those places.”
https://www.linuxjournal.com/content/internationalizing-kernel

But it is no longer 2018, and now it’s feasible to imagine that automated processes can make programming easier for a large swath of people. Billions of people primarily speak languages other than English. Will this hegemony last for the rest of time? Could this not be a structural disadvantage for non-native speakers of English?

The Solution

Let’s imagine a code editor. This editor has a translation engine built in. Before the variable name is presented to the programmer, it tokenizes and translates every part of the source code. Every variable, symbol name, reserved keyword, function call, etc. It could be a VS code plugin. The one-way mapping would be relatively simple. But to start, there would be the strict requirement that we translate back into the original form of the language and reverse-translate any new code written.

So upon saving, the editor would have to write the file out in a form compatible with the linter and compiler it was originally written in (and make sure there’s no collisions with reserved words for that language). Not a bad task for a proof of concept.

In my previous writing, I proposed the idea of a side-car file for code comments. Now, this suggestion is a strict superset of that — we can cache the translations in the same sidecar files I mention here.

So, is this an interesting idea? Should I work on a proof-of-concept? Let me know in the comments.

Edit: 2 February 2023 -What I think would be extremely easy and reasonable is monkey-patching the context hover menu to automatically translate words.

P.S. What about today?

I am far from the first to bring light to this issue.

Also: I found a handful of extensions that use various translation API’s to perform the forward mapping. I hope more of these appear in the future.

--

--

No responses yet