#!/usr/bin/perl if($ENV{'QUERY_STRING'} eq "1") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); # open(DIC, "; # close(DIC); foreach $pair(@pairs) { ($name, $value) = split(/=/, $pair); if($name eq "dictionary") { $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; @dic = split(/\n/, $value); foreach $dic(@dic) { chomp($dic); ($actual , $desired) = split(/=/, $dic); $list{ $actual } = $desired; } } } foreach $pair(@pairs) { ($name, $value) = split(/=/, $pair); if($name eq "pinglish") { $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $pinglish = $value; $value =~ s/\n/ \@ /g; $persian = " $value "; ############################################ foreach $key(keys %list) { $value = $list{ $key }; $persian =~ s/$key/$list{$key}/g; } $persian =~ tr/\r/ /; ############################################ $persian =~ s/ aa/ آ/g; $persian =~ s/ ee/ اي/g; $persian =~ s/ee /ی /g; $persian =~ s/ e / /g; $persian =~ s/gh'/غ/g; $persian =~ s/ oo/ او/g; $persian =~ s/aa/ا/g; $persian =~ s/a'/ع/g; $persian =~ s/a\^/ئ/g; $persian =~ s/a / /g; $persian =~ s/ a/ ا/g; $persian =~ s/ch/چ/g; $persian =~ s/ee/ي/g; $persian =~ s/ e/ ا/g; $persian =~ s/e'/ع/g; $persian =~ s/gh/ق/g; $persian =~ s/h'/ح/g; $persian =~ s/ i/ اي/g; $persian =~ s/i /ی /g; $persian =~ s/kh/خ/g; $persian =~ s/oo/و/g; $persian =~ s/ o'/ ع/g; $persian =~ s/ou/و/g; $persian =~ s/o /و /g; $persian =~ s/ o/ ا/g; $persian =~ s/ph/ف/g; $persian =~ s/sh/ش/g; $persian =~ s/s'/ص/g; $persian =~ s/t'/ط/g; $persian =~ s/x'/ظ/g; $persian =~ s/y /ی /g; $persian =~ s/ye /ی /g; $persian =~ s/zh/ژ/g; $persian =~ s/z'/ذ/g; $persian =~ s/a//g; $persian =~ s/b/ب/g; $persian =~ s/c/ث/g; $persian =~ s/d/د/g; $persian =~ s/e//g; $persian =~ s/f/ف/g; $persian =~ s/g/گ/g; $persian =~ s/h/ه/g; $persian =~ s/i/ي/g; $persian =~ s/j/ج/g; $persian =~ s/k/ك/g; $persian =~ s/l/ل/g; $persian =~ s/m/م/g; $persian =~ s/n/ن/g; $persian =~ s/o//g; $persian =~ s/p/پ/g; $persian =~ s/q//g; $persian =~ s/r/ر/g; $persian =~ s/s/س/g; $persian =~ s/t/ت/g; $persian =~ s/u/و/g; $persian =~ s/v/و/g; $persian =~ s/w/و/g; $persian =~ s/x/ض/g; $persian =~ s/y/ي/g; $persian =~ s/z/ز/g; $persian =~ s/\?/؟/g; $persian =~ s/\,/،/g; ############################################ $persian =~ s/ \@ /\n/g; } } } else { open(DIC, "; close(DIC); $#dic = $#dic-1; $pinglish = ""; $persian = ""; } $pinglish =~ tr/+/ /; $persian =~ tr/+/ /; print "Content-type:text/html\n\n"; print < Pinglish to Persian Translator
Make your own free website on Tripod.com
به فارسی Pinglish مترجم
Pinglishفارسی Pinglishفارسی Pinglishفارسی Pinglishفارسی Pinglishفارسی Pinglishفارسی Pinglishفارسی
?؟ aaآ a^ئ a/aaا bب pپ tت
cث jج chچ h'ح khخ dد z'ذ
rر zز zhژ sس shش s'ص xض
t'ط x'ظ a'ع gh'غ f/phف ghق kك
gگ lل mم nن v/w/u/ooو hه y/i/eeى

EndHTML