KeshavAnandCode 0ab35b8a90
All checks were successful
Pack Validation CI / validate (push) Successful in 7s
Trigger Docs Rebuild / trigger (push) Successful in 2s
added readme
2026-05-21 15:16:38 +00:00
2026-05-20 22:07:27 -05:00
2026-05-19 15:32:42 +00:00
2026-05-19 16:36:03 -05:00
2026-05-19 15:33:47 +00:00
2026-05-19 15:32:42 +00:00
2026-05-19 17:57:02 -05:00
2026-05-21 15:16:38 +00:00

foreignthon-ta

Tamil language pack for ForeignThon — write Python in தமிழ்.


Install

pip install foreignthon foreignthon-ta

Example

fizzbuzz.ta.py

ிரலகம fizzbuzz(n):
    ஆக i உள வரம(1, n + 1):
        i % 15 == 0 @@ஆன:
            பதிி("FizzBuzz")
        i % 3 == 0 @@இலஆன:
            பதிி("Fizz")
        i % 5 == 0 @@இலஆன:
            பதிி("Buzz")
        மறறபடி:
            பதிி(i)

fizzbuzz(20)

This uses Tamil's natural SOV word order — the condition comes first, then the keyword with @@. See Postfix Syntax for details.

Compiles to standard Python:

def fizzbuzz(n):
    for i in range(1, n + 1):
        if i % 15 == 0:
            print("FizzBuzz")
        elif i % 3 == 0:
            print("Fizz")
        elif i % 5 == 0:
            print("Buzz")
        else:
            print(i)

fizzbuzz(20)

Keyword reference

Python தமிழ்
if ஆனால்
else மற்றபடி
elif இல்லைஆனால்
for ஆக
while வரை
def நிரல்பாகம்
class கோப்பு
return பின்கோடு
import இறக்கு
True உண்மை
False பொய்
None ஒன்றுமில்லை
print பதிப்பி
input உள்ளீடு
len நீளம்
range வரம்பு

Full mapping: ta.json


Postfix syntax

Tamil is SOV — the condition naturally comes before the keyword. The @@ operator lets you write it that way:

# prefix style (also valid)
ஆன x > 0:
    பதிி(x)

# postfix style — natural Tamil order
x > 0 @@ஆன:
    பதிி(x)

Both compile identically. Decompile standard Python with postfix output:

fpy decompile script.py --lang ta --postfix

Start a project

fpy new myproject --lang ta
cd myproject
fpy run src/main.ta.py

Documentation

foreignthon.keshavanand.net


Contributing

Found a missing translation or a better keyword choice? Open an issue or PR — no access to the core repo needed.


License

GPL v3

Description
Tamil language repo for foreignthon
Readme GPL-3.0 83 KiB
v0.2.4 Latest
2026-05-21 15:36:17 +00:00
Languages
Python 100%