Coding in your native language – have you heard of Legesher?
Tags: legesher, programming, learning, language
Published: 2020-11-29 20:13:01

As developers, we are used to writing programming commands in English (this is just a pseudo example from my little Java game where I actually use Finnish in variable and function names – gasp – I may actually change it to English at some point):
```java
private int blocks;
private boolean ready;

public boolean addBlock() {
  if (!this.ready) {
    this.blocks++;
    return true;
  }
  return false;
}
```
For someone who doesn't speak English at all, learning all these keywords requires much more effort compared to someone who already understands English. An English speaker is able to deduct a lot of the code's meaning and, I would imagine, can more easily memorize the programming language.

Take a look at the above example in a language you may not understand:
```java
yksityinen kokonaisluku palat;
yksityinen totuusarvo valmis;

julkinen totuusarvo lisääPala() {
  jos (!tämä.valmis) {
    tämä.palat++;
    palauta tosi;
  }
  palauta epätosi;
}    
```
How easily do you think you would learn that?
As a Finn, how cool would it be to code like that!

# Legesher project wants people to code in their native language
Senja @sjarva introduced me to the delightful [Legesher](https://docs.legesher.io/) project a while back. The project aims to take a step further from just [learning the basics of programming in one's own language](https://dev.to/sjarva/anyone-who-is-studying-the-basics-of-programming-should-have-the-right-to-study-them-in-their-own-native-language-1a28): imagine being able to _code_ in your own language!

Senja invited me to help with reviewing the Finnish translations for Python keywords (Python is currently prioritized) and what an eye-opening experience it was! Some of them were very straightforward: `false` - epätosi, `true` - tosi, `class` - luokka, `if` - jos. Some of them were tricky: `elif` isn't even English! Some of them were puzzling: for a language like Finnish which doesn't really have prepositions, `as`, `for`, `from` and `in` require quite creative translation.

We'll see what the original translator and the other reviewers think but I was pretty proud of some of the suggestions I came up with. :blush:

# English dominates
All the programming/markup/stylesheet languages I know are based on English: HTML, CSS, PHP, Java, JavaScript, Python... I've never had any problem with it (or found it strange) but now this got me thinking, are there _any_ programming languages that are not.

[Turns out there are](https://en.wikipedia.org/wiki/Non-English-based_programming_languages)! One of them is [Tampio](https://github.com/fergusq/tampio) based on Finnish. :thumbsup: What's your favourite?

(Sure, there are entirely symbolic programming languages, but those based on natural languages are more interesting to me.)

# You can help with Legesher, too
If you know a language other than English well and want to help with the Legesher project, head on over to [the GitHub repo](https://github.com/legesher/legesher-translations). No matter whether you are translating or reviewing, you need to really think about which word best describes the meaning behind the programming keyword. You cannot just pick the first equivalent from a dictionary.

I suppose that with Legesher I still cannot write Python like this
```
tulosta('Hei maailma!')
```
because `print` is a function name and I don't see them being translated in the project (do correct me if I'm wrong), but the project is a step in that direction – and perhaps function names etc. are in its future plans.

Nevertheless, it was such a fun project to contribute to and I look forward to the reviewing and translation progressing!

<small>Cover photo by <a href="https://unsplash.com/@markusspiske?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Markus Spiske</a> on <a href="https://unsplash.com/s/photos/matrix?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></small>