Programming in Python using a Non-English language for keywords and variables

programming-languages, python

Solution

Chinese Python used to allow programmers to write source code entirely in Chinese, including translated module names, function names, and all keywords. Here's a code example from their website:

載入 系統               # import sys
文件名 = 系統.參數[1:]   # filenames = sys.argv[1:]

定義 修正行尾(文件):     # def fixline(file):
    內文 = 打開(文件).讀入()  # text = open(file).read()
    內文 = 內文.替換('\n\r','\n') # text = text.replace('\n\r', '\n')
    傳回 內文          # return text

取 文件 自 文件名:     # for file in filenames:
    寫 修正行尾(文件)  # print fixline(file)

Sadly, it is no longer an active project, but you can get the source and find out what they changed to get an idea for your own implementation. (Learning why they failed may also help you understand what challenges you will have in making such a system successful).

Problem

My end goal is to enable people that know the language Urdu and not English to be able to program in a Python environment. Urdu is written left to right. I imagine having Urdu versions of all python keywords and using Urdu characters to define variable/function/class names. Is this goal possible? If yes, then what all will need to be done? I can already see one issue where the standard library functions would still be in English. Update: Whether this should be done or not is certainly a very interesting debate topic, which I'd love to talk about. However, is it actually possible and how? I love Python and I know a lot of intelligent people that might never be taught English properly, only Urdu, hence the thought.

Original source