Floating Google Translator
This package creates a FLOATING Google Translate module on the bottom right corner of page. Please note that not all browsers support this. It uses CSS position:fixed.
Instructions
To install this package in your site, create/edit these pages with the following content:
This page | Contains this line |
---|---|
nav:side | [[include :csi:include:google-translator folded=no|class=class|style=extra-styling:isthis|customhide=hide|hide=a custom hide message|customshow=show|show=a custom hide message]] |
Installed Example - this page ->
Code Used:
[[include :csi:include:google-translator class=join-box|style=background-color: red;|customhide=hide|hide=hide Google Translate|customshow=show|show=show Google Translate]]
Include files
google-translator | By tsangk | 14 Nov 2009 05:04 |
google-translator-backend | By tsangk | 15 Nov 2009 04:09 |
Comments: 13
page revision: 5, last edited: 16 Nov 2009 05:35
Very nice, Kenneth! (I notice that "- hide translator" is split over two lines)
Portfolio
So how can I fix this?
Kenneth Tsang (@jxeeno)
I was looking all over the place trying to find it :) (eventually did see it though) Maybe it'd be worth making it easier to find?
Putting a border/background around it and making it look like a button, perhaps?
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
Shane? Something like this?
Kenneth Tsang (@jxeeno)
Yes, that sounds good! :) Can customise it depending on the site using CSS.
Also, I just realised that if the translator is open by default (as it seems to be on this page), it's fairly obvious (which is a good thing IMO). If I wasn't looking for it on the page before, I don't think I would have ever seen it. That might have been related to the blue background behind the link…
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
Ken, I thought it looked better the way you originally did it. :-) It's much easier to find than when it is in a sidebar that's scrolled off the bottom of the page, and yet discrete for when you don't need it. I wouldn't want that sort of tool to dominate my page - your original implementation doesn't do that. :-)
Edit: Is there a way to use the button for "show translator" but not use the button for "hide translator"?
Sue
Yes, it'd have to look like this:
As long as there is a space there, it'll work. The link will exist, so that you can still hide it, but it'll be a space character and therefore will be invisible.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
More attributes added: customhide which when activated works with hide and also customshow with works with show. Shown on this page is:
If you don't want a custom message, don't fill in customhide or customshow. If you enter a message in hide and/or show but didn't fill in customhide and/or customshow, custom message will not be activated.
— tsangk
Kenneth Tsang (@jxeeno)
How do you add that grey button to show and hide the google translate?
Like this:
Kenneth Tsang (@jxeeno)
I did exactly the same thing, only change the background color but still there's only the texts to click. I guess it must be something else. Your "Join this site" button also looks similar tho the show-hide Translate button. How did you do that?
Sorry. You must include the following code:
Kenneth Tsang (@jxeeno)
Thanks a lot!!! It works ^_^