The Translate block entry required approval before it was viewable by everyone. This has now been done.
Paul thanks for your block.
very interesting block. German translation added.
You should change the declaration forethe 'to' field. The leading and final space in the lang field will be a problem for some translators.
Under 1.9 I get the following message: Notice: Undefined property: footer in [...]/moodle/blocks/moodleblock.class.php on line 240
Helen, thanks for making it live
Ralf Krause suggested to change the 'to' to '>'. I think this is a good idea and needs no translation.
I just found a problem: if the translation is block is on the same page like an element with the HTML Editor, the editor is also integrated in the text field of the block and breaks the page structure.
Ralf
Thanks for picking that up. Could you let me know the steps I can take to reproduce this bug, and perhaps get a screen shot of what happens? That would help me to narrow down what is causing the problem.
Paul
This is a the top of the main page in black type.
1) Where do you set or check the permission on a new plug-in?
Helen Foster says the Translate block entry requires approval before it is viewable by everyone.
2) How is that done?
I am using Moodle 1.8+ in a MAC PPC. I went into the MAC OS systems and set "admin" permission to read/write and "everyone" permission to read. Is this what I should be doing to correct this or I am I out in left field some place staring are the moon?
Thanx
Tim
Helen's statement was about the download package for the translate block plugin being viewable by everyone in the Moodle.org plugin repository. Before approval by one of the Moodle.org maintainers, plugins are only visible to the developer who uploaded it.
You don't need to change any permissions on your Moodle install to make it working. You should however remove it from the mod directory and put it inside the blocks directory. Afterwards visit the admin page of your moodle installation. The block should then be installed automatically.
Hello felows!
I'm writting you from Chile. Here this about moodle is something very new... I never realise that moodle was so complete and powerful!
I just installed de translator block, but I have this error message when I try to translate something
"Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/wi490402/public_html/intranet/blocks/translate/ajax_translate.php on line 9"
Can you give me some help please!
Best regards,
Gustavo
Hello,
I've just solve this problem by setting in 0 instead 1 the value that appears in the line 9 of the ajax_translate.php file...
Now I have another doubt ... How can I change the size of the text area where you write the text that you want to translate?
Because I'm using a theme that makes that the text area look too big...
thanks!!
Gustavo
I works prefect now.
Tim
Hello!!
How can I change the size of the Input text area, because is to big for mi purpose.
Thanks,
Gustavo
If you open block_translate.php, you'll find a line near the end of the script that looks like this:
<textarea cols="30" rows="3" id="translate_input"></textarea>
The cols and rows attributes determine how big the input text area is.
However it could be you are experiencing the problem mentioned by Ralf above, which is detailed here.
Paul
Hi Paul, and thanks for your help.
But, I understand that those attributes are referred about how mach text can I put into the text area, and I want to change the size (in pixels) of the text area.
(Sorry for my english!! jaja)
Gustavo
Those attributes do control the size of the input area, try changing them and you'll see
For instance if you want to make it taller, increase the rows attribute.
Paul
when i press translatethan i have this error message:
Fatal error: Call to undefined function curl_init() in C:\xampp\htdocs\moodle\blocks\translate\ajax_translate.php on line 6
...any idea to solve the problem???
i have moodle 1.7
thanks
When I try to use the translate block I get the following error:
Notice: Undefined offset: 1 in /webdocs/sandbox/moodle/blocks/translate/ajax_translate.php on line 14
I do not get any translation output.
Is there anything I can do to help debug this issue?
Thanks
Luca
Google have recently slightly changed how the translations are returned to a browser. The following change to ajax_translate.php should fix your problem:
Around line 13, you'll find the following line:
preg_match('#<div id=result_box dir=ltr>(.*?)</div>#s', $html, $out);
Change it to the following:
preg_match('#<div id=result_box dir="ltr">(.*?)</div>#s', $html, $out);
Hopefully that'll solve both your problems - let me know!
Paul
Now when I ask the traduction (in Italian, for example) of "green" I get the same thing: "green". Also with other languages....
Before I cannot see nothing.
But the way you show is right: it is a google change in some parameters.
Thank you very much
Luca
Thank You,
Luca.
I have uploaded to the blocks folder, all set up fine, but after I added it to my page and entered text nothing is translated. Am I missing something?
Any help would be great.
Jim
I have had this block working perfectly since April 2008, accross serveral Moodle Sites including versions 1.8 and 1.9
Between September 2009 and now (November 2009) it has suddenly stopped working i.e. noting appears in the translation output box.
Do you know if Google have once again changed "how the translations are returned to a browser"
Any help or advice greatly appreciated.
Thanks
Eddie
Indeed, Google have changed how the translations are returned.
You'll need to update the global Translator block config - from your Site Administration panel, select Modules > Blocks > Translator and paste the following into the block_translate_pattern field:
#<span title=".*" Xonmouseover=".*'" Xonmouseout=".*'">(.*?)</span>#s
This works for now (until they change the result page again, of course!)
Edit: Moodle has eaten my formatting - exclude the X's from the string I gave above.
I'm not getting any translated text from the block. I can tell you cURL is enabled and Ajax is working. Perhaps the Google API has changed?
By the way, I don't have a global config page. There is no global config HTML file with the block code I just downloaded.
Any advice?
Michael;
I've found that Google's translate_t Ajax API no longer works. Google offers a JavaScript API and I was able to use that to get this block going.
I've attached the code to this message for others to test.
Michael;