To do this, we will link the button directly to Google´s own Translation tool so that when it is clicked, the visitor opens it in a new window and can choose what and how to perform the translation. There are then three elements to our button:
- The link [the button function]
- The background image (the shape of the button]
- The foreground image [the graphic on the button]
So, we do this:
<a class="widgetbutton" href="#" onclick="alert('Hello World');" href="http://translate.google.com" target="newwindow"><img
src="/icons/13107" height="48" width="48" border="0" alt="Hello World" alt="Google Translate"/></a> |
We will keep the "widgetbutton" declaration, so we don´t have to format our own button shape. That leaves finding a Google Translate Icon. Let´s use the Translate App icon, pictured below:
Now, to get this graphic onto the button, do the following:
- Grab the icon above: drag-and-drop it to your Desktop [your OS Desktop, not the FirstClass Desktop]. It will appear there as "GoogleTranslate.png".
- Go to your FirstMagic website in FirstClass, and open the Ensemble Folder
- Drag the graphic from your OS Desktop into the Ensemble folder.
Now you have it online, in your FirstMagic site, and can link to it. The URL to use is:
/Ensemble/GoogleTranslate.png
So, we input that into our button code:
<a class="widgetbutton" href="http://translate.google.com" target="newwindow"><img src="/Ensemble/GoogleTranslate.png" height="48" width="48" border="0" alt="Google Translate"/></a> |
... And our button is complete. To use it, simply copy the code snippet we created into the Button Field in your Google Translator Widget and remove the "No Button" check you put there in Example 1. Then turn on the "This Widget is a Button" checkbox to try it out!
|