Author |
Message |
prekill
Worker
Joined: Oct 22, 2005
Posts: 201
|
Posted:
Fri Nov 19, 2010 12:31 am |
|
Hey,
Have any one see this ever?
http://www.n2h.it/wp-plugins/wordpress-global-translator-plugin/
I think it would be a great thing to have it in ravenuke.
I has a cach system and redirects.
Does we have something like this in nuke? (never seen one but I am surelly intrested.) there is a guide or something on how to convert wordpress plugins to nuke? I will sure give it a try. |
|
|
|
|
nuken
RavenNuke(tm) Development Team
Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Fri Nov 19, 2010 6:17 am |
|
I use a hard coded translation menu on top of my modules block. It is no where near as fancy as that one, but it works. It translates the user to the current page they are on. Here is the code if you want it.
Code:$current=$_SERVER['REQUEST_URI'];
$content ="<center><a rel=\"nofollow\" href= \"http://translate.google.com/translate?u=$nukeurl$current&sl=en&tl=es&hl=en&ie=UTF-8\"><img src=\"images/sp.png\" border=\"0\" alt=\"Spanish\" title=\"Spanish\" /></a> <a rel=\"nofollow\" href= \"http://translate.google.com/translate?u=$nukeurl$current&sl=en&tl=nl&hl=en&ie=UTF-8\"><img src=\"images/dt.png\" border=\"0\" alt=\"Dutch\" title=\"Dutch\" /></a> <a rel=\"nofollow\" href= \"http://translate.google.com/translate?u=$nukeurl$current&sl=en&tl=fr&hl=en&ie=UTF-8\"><img src=\"images/fr.png\" border=\"0\" alt=\"French\" title=\"French\" /></a> <a rel=\"nofollow\" href= \"http://translate.google.com/translate?u=$nukeurl$current&sl=en&tl=it&hl=en&ie=UTF-8\"><img src=\"images/it.png\" border=\"0\" alt=\"Italian\" title=\"Italian\" /></a> <a rel=\"nofollow\" href= \"http://translate.google.com/translate?u=$nukeurl$current&sl=en&tl=de&hl=en&ie=UTF-8\"><img src=\"images/gr.png\" border=\"0\" alt=\"German\" title=\"German\" /></a> <br /></center>";
|
You would need to put the flag images in your images folder. |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
|
prekill
|
Posted:
Fri Nov 19, 2010 7:52 am |
|
But this way googles iframe is displayed and the new "page" isnt get indexed in search engines.
Any idea on how to start converting this module? |
|
|
|
|
Guardian2003
Site Admin
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Sat Nov 20, 2010 11:56 am |
|
For SEO, you would need to change the language META
Code:<meta http-equiv="content-language" content="en">
|
OR you can seperate the available languages like this
Code:<meta http-equiv="content-language" content="en, fr, de">
|
OR you would need to change the actual HTML language attribute in the header
OR you can actually tell search engines/browsers which language they should use with multiple languages on the SAME page like this
Code:<p>'I Serve' in German is <Q lang="de">ich dein</Q></p>
|
The problem with on-the-fly translation tools is they are not very accurate (IM Translator is the best and also available as a Firefox plug-in) or Google's Chrome browser has a nice translation feature. |
|
|
|
|
prekill
|
Posted:
Sun Nov 21, 2010 4:29 pm |
|
Guardian2003 Yes, but this is something much different from on-the-fly.
The translation is on-the-fly but its also rewrite the URL and cach the page as its really exist on the server. in the end you got your site translated to all languges.. and get the pages indexed in search engines. so you can get much more traffic.
The translations isnt that accurate but it does the job, visit the link I provided. there is a whole system ready for Wordpress..
How hard can it be to convert it over nuke? and what will be a good point to start with?
thanks. |
|
|
|
|
Guardian2003
|
Posted:
Sun Nov 21, 2010 6:01 pm |
|
Wordpress does allow the ability to store 'content' based on different languages in it's database. If you have ever used Worpress, you'll know that you have to create a seperate 'page' for each language and you can also set the 'default' language for each specific content page differently.
Unfortunately this is simply not possible with PHP-Nuke or derivatives at the moment because there is simply no way (at the moment) to differentiate content based on language; the closest thing we have is the News module, which does offer a somewhat limited multi-lingual content capability.
From my brief look at the code for the Plug-In you referenced, all it seems to do is automate the process of creating multi-lingual content from an existing page by creating the new entry in the database, updating the sitemap and updating the url re-writing.
It does create a temporary, physically 'web page' in the cache directory but this data from the database; in essence, dynamic content.
I'm not saying it would be impossible to re-engineer this for use on systems other than Wordpress BUT the it would require the base system to have the capability to store language dependent content in it's database. |
|
|
|
|
prekill
|
Posted:
Mon Nov 22, 2010 3:05 pm |
|
Thank for the reply!
Can't it do something simpler, something like cach the whole page without manipulationg the database? and just display the cach page? (lets say we will cach the page for 10 days) and every once in a while run the script to cach update version of the page. as for the original version is unthuched..
This for SEO porpouses only. more index pages, more traffic.
any idea for something like that? does it exsists for nuke?
thanks! |
|
|
|
|
Guardian2003
|
Posted:
Mon Nov 22, 2010 3:37 pm |
|
prekill wrote: | Can't it do something simpler, something like cach the whole page without manipulationg the database? |
That was the point I was trying to make. Where do you get the data for the page if it does not come from the database?
You either need to be able to store that data in a database where you can then grab the data based on a specific language or translate on-the-fly from one language to another.
Quote: | This for SEO porpouses only. more index pages, more traffic. |
I agree completely. I recently deployed a multi-lingual site for a client in English/Slovak and both languages appear on Googles first page for the sites targeted keywords (in both languages).
Quote: | any idea for something like that? does it exsists for nuke? |
Not at the moment. To do it properly there needs to be a way to identify language dependent content, which there isn't in *nuke (at the moment). The only other alternative would be to write a script to physically create HTML pages based on what is already available (possibly use a sitemap as the base 'list').
It is certainly possible to do that, though I'm not sure what the resource overhead would be for a big site and it isn't something I would do myself.
The best way to handle this would be to alter the way that *nuke works so that language dependent content can be handled correctly. |
|
|
|
|
prekill
|
Posted:
Tue Nov 23, 2010 7:13 am |
|
Isn't it possible to just cach the on-the-fly translated page after it gets translated and display it? |
|
|
|
|
|