Changeset 746 for trunk/includes/global.php
- Timestamp:
- Jan 10, 2014, 11:06:39 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/global.php
r745 r746 144 144 145 145 function GetTranslateGoogle($text) { 146 146 global $System; 147 147 // $text = 'Balthule\'s letter is dire. This Cult of the Dark Strand is a thorn in my side that must be removed. I have been dealing with some of the Dark Strand scum northeast of here at Ordil\'Aran. One of their number possesses a soul gem that I believe holds the secret to the cult\'s power.$b$bBring it to me, and I will be able to decipher the secrets held within.'; 148 148 // $text = htmlspecialchars($text); 149 150 $text = str_replace('$B','$B ',$text); 149 151 $text = urlencode($text); 152 // $text = strtolower($text); 150 153 // $text = str_replace('&','',$text); 151 154 // $text = str_replace(' ','%20',$text); 152 // $text = str_replace('$B','$B%20',$text); 153 $url = 'http://translate.google.cz/?sl=en&tl=cs&text='.$text; 155 if ($System->User->Language == 2) 156 $lang = 'sk'; 157 else $lang = 'cs'; 158 $url = 'http://translate.google.cz/?sl=en&tl='.$lang.'&text='.$text; 154 159 155 160 … … 169 174 $data = $partbefore.' '.$partafter; 170 175 } 176 177 $data = utf8_encode($data); 171 178 172 179 $data = str_replace('$ ','$',$data); 180 $data = str_replace('$b $b','$b$b',$data); 173 181 $data = str_replace('| ','|',$data); 174 182
Note:
See TracChangeset
for help on using the changeset viewer.