pocobueno1388 Posted September 13, 2010 Share Posted September 13, 2010 Hello, I have a directory on my site named "spanish", and I would like any webpage in that directory to be translated to spanish automatically. So is there a way to tell mod_rewrite to add the following string (below) to the beginning of the URL ONLY IF the webpage is in the directory "spanish"? String I'm trying to add to beginning of URL http://translate.google.com/translate?hl=en&sl=en&tl=es&u= So say the url was: www.optimumhealthcare.org/spanish/page.html I would want it to change that URL to: http://translate.google.com/translate?hl=en&sl=en&tl=es&u=www.optimumhealthcare.org/spanish/page.html Any help would be greatly appreciated! Thanks Link to comment https://forums.phpfreaks.com/topic/213317-mod_rewrite-help/ Share on other sites More sharing options...
schilly Posted September 13, 2010 Share Posted September 13, 2010 You want to redirect your traffic to google? You could try their AJAX translation API: http://code.google.com/apis/ajaxlanguage/documentation/#Translate Link to comment https://forums.phpfreaks.com/topic/213317-mod_rewrite-help/#findComment-1110721 Share on other sites More sharing options...
pocobueno1388 Posted September 15, 2010 Author Share Posted September 15, 2010 Thanks, that is a much better solution! Link to comment https://forums.phpfreaks.com/topic/213317-mod_rewrite-help/#findComment-1111475 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.