abrahamgarcia27 Posted August 9, 2011 Share Posted August 9, 2011 Hello i am trying to translate a table field, but i am having trouble with the syntax Translating Script <?php require("GTranslate.php"); error_reporting(E_ALL); ini_set('display_error',1); /** * Example using RequestHTTP */ $translate_string = "¿Cómo está usted"; try{ $gt = new Gtranslate; echo "".$gt->spanish_to_english($translate_string)."\n"; } catch (GTranslateException $ge) { echo $ge->getMessage(); } ?> and here is a table field example i want to translate <td><?php echo nl2br(str_replace(array('\n', '\r'), "\n", $item->tablefield));?></td> i am totally new to php Link to comment https://forums.phpfreaks.com/topic/244302-translating-a-table-field-pdf-print-out/ Share on other sites More sharing options...
voip03 Posted August 9, 2011 Share Posted August 9, 2011 Can you use' PDFLib extension'? Link to comment https://forums.phpfreaks.com/topic/244302-translating-a-table-field-pdf-print-out/#findComment-1254739 Share on other sites More sharing options...
abrahamgarcia27 Posted August 9, 2011 Author Share Posted August 9, 2011 i was reading but it seem that it doesnt do spanish to english does it? Link to comment https://forums.phpfreaks.com/topic/244302-translating-a-table-field-pdf-print-out/#findComment-1254744 Share on other sites More sharing options...
voip03 Posted August 9, 2011 Share Posted August 9, 2011 I never try it. but it can be down Link to comment https://forums.phpfreaks.com/topic/244302-translating-a-table-field-pdf-print-out/#findComment-1254745 Share on other sites More sharing options...
voip03 Posted August 9, 2011 Share Posted August 9, 2011 Try using FPDF http://www.fpdf.org it's very good and easy to use. Take a look at the examples in the "Tutorials" and "Scripts" section. http://www.fpdf.org/ Link to comment https://forums.phpfreaks.com/topic/244302-translating-a-table-field-pdf-print-out/#findComment-1254753 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.