-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtranslation.php
90 lines (82 loc) · 3.61 KB
/
translation.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?PHP
/*
* Copyright (C) 2014 Vinodh Rajan [email protected]
*
* This file is a part of Anunaadam.
*
* Anunaadam is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. This program is distributed in the hope that it
* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
* Public License for more details. You should have received a copy of the GNU
* Affero General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
if (isset ( $_REQUEST ['txt'] )) {
echo lanconTrn ( trim ( $_REQUEST ['txt'] ), $_REQUEST ['lang'] );
}
function lanconTrnL($text, $lang)
{
if ($lang == "en")
return lanconTrn ( $text, $lang );
else
return $text;
}
function lanconTrn($text, $lang) {
$transString = array (
"முகப்பு" => "Home",
"கருத்து" => "Feedback",
"மற்ற கருவிகள்" => "Other Tools",
"அக்ஷரமுகம்" => "Aksharamukha",
"அவலோகிதம்" => "Avalokitam",
"தமிழ் - IPA" => "Tamil - IPA",
"பதிவிறக்கம்" => "Download",
"அனுநாதம் குறித்து கருத்துக்கள், ஆலோசனைகள் ஏதேனும் இருப்பின் தெரியப்படுத்துக:" => "Please provide your feedback and suggestions about Anunaadam here:",
"பெயர்:" => "Name:",
"மின்னஞ்சல்:" => "E-mail:",
"அனுப்புக" => "Send",
"மொழி" => "Language",
"தமிழ் ஒலிப்பு எழுத்து மாற்றி" => "Tamil Transcription Tool",
"ஆரவம்" => "Āravam",
"ஐ.பி.ஏ எழுத்துரு" => "IPA Font",
"எழுத்துரு அளவு" => "Font Size",
"உரை வெளியீடு" => "Text Ouput",
"கோப்பாக சேமிக்க" => "Save as File",
"ஒலிபெயர்ப்பு முறை" => "Transcription Method",
"குறுகலான" => "Narrow",
"பரவலான" => "Broad",
"ஐ.பி.ஏ → தமிழ்" => "IPA → Tamil",
"தமிழ் → ஐ.பி.ஏ" => "Tamil → IPA",
"TXT கோப்பாக" => "TXT File",
"யாப்பு மென்பொருள" => "Tamil Prosody Analyzer",
"எழுத்துமுறை மாற்றி" => "Script Converter",
"பிற எழுத்துமுறைகள்" => "Other Scripts",
"அச்சிடுக..." => "Print...",
"தெலுங்கு" => "Telugu",
"கன்னடம்" => "Kannada",
"மலையாளம்" => "Malayalam",
"ஐ.பி.ஏ" => "IPA",
"தேவநாகரி (ஹிந்தி)" => "Devanagari (Hindi)",
"குஜராத்தி" => "Gujarati",
"பஞ்சாபி (குர்முகி)" => "Punjabi (Gurmukhi)",
"வங்காளம்" => "Bengali",
"உருதி" => "Urdu",
"கிரந்தம்" => "Grantha",
"தமிழ்-கிரந்தம்" => "Tamil-Grantha",
);
if ($lang == "en") {
if (array_key_exists($text,$transString))
return $transString [$text];
else
return $text;
} else {
$revTs = array_flip ( $transString );
if (array_key_exists($text,$revTs))
return $revTs [$text];
else
return $text;
}
}
?>