YaLang (ي) is an open source programming language where you can write python code in arabic language.
It takes the arabic text and convert it into python code and execute it. Which then can be used anywhere. You can code anything which you can code in python.
- Hello WorldSample File اهلا.ي
اكتب("اهلا و سهلا يا عالم")؛Output:
اهلا و سهلا يا عالم- ConditionSample File لو.ي
ع= ٧
لوع ٪ ٢ == ٠:؛
اكتب("ع الفردية")؛
ولو ٧ == ٠:؛
اكتب("هذا صفر")؛
آخر:؛
اكتب("ع الزوجية")؛Output:
ع الزوجية- FunctionSample File وظيفة.ي
وظيفةجمع(اولا، ثاني):؛
كل=اولا+ثاني؛
إرجعكل؛
اكتب("جمع = "، جمع(٢، ٣))؛Output:
جمع = ٥NOTE: ؛ is optional at the end of line
For more sample code see (https://github.com/yalang/yalang-sample)
- macOS
- Python 3
- Clone this repo:
git clone https://github.com/yalang/yalang.git
cd yalang- Run install.sh:
./install.sh- Add
export PATH=$HOME/yalang/bin:$PATHto.bash_profileor.bashrc
Create a new file with name
اهلا.يand open in any editor.Write this in the file
اكتب("اهلا و سهلا يا عالم")؛Save it
Open a terminal and go to the folder where file is saved
Run this command
ي اهلا- It will print
اهلا و سهلا يا عالم