Forum Archive - display warning msg+link when page is translated ?

display warning msg+link when page is translated ?
Feb 7, 2015 9:35 pm by fff
Hi, Your free version rocks ! I seriously consider the pro version, but I need a feature that, very suprisingly I can not find in the forum How-to display a message on all translated page like "[size=150:38qv2cfz]This page was machine translated ; in case of problem, please click HERE for original page[/size:38qv2cfz]" I can write a small PHP script and insert that in a module, but for that I need 2 pieces of code from you 1-how to detect in php this is a translated page (in order to show the message only on these) ? 2-how to generate the link-path to the original page (=non translated page) ? The above steps are very likely simple for you ; you probably have the #2 already for the link in the main flag ; please help The code is likely to be different from free to pro version ; please for pro as I really consider this one. ??? Thanks, Fabrice
Re: display warning msg+link when page is translated ?
Feb 7, 2015 11:17 pm by Yana
Dear Fabrice, You can detect current selected language and display the message. To detect current selected language: for GTranslate Pro Joomla system plugin it is JSession::get('glang'); for the GTRanslate Pro General version it is $_GET['glang'] variable
Re: display warning msg+link when page is translated ?
Feb 8, 2015 9:03 am by fff
thanks Yana, but what about the 2nd part of my question : code of path to original, non translated, page ? thanks, Fabrice
Re: display warning msg+link when page is translated ?
Feb 9, 2015 8:48 am by Yana
Dear Fabrice, You should be able to get current URL using $_SERVER['REQUEST_URI']
Re: display warning msg+link when page is translated ?
Feb 9, 2015 9:42 pm by fff
no, the question is not about current url, but about url to the original, non translated page example: I am in the automatically translated armenian page, and I want to provide a link to the original English page so ?
Re: display warning msg+link when page is translated ?
Feb 10, 2015 1:22 pm by Yana
Hi, You can get current URL using $_SERVER['REQUEST_URI'] and the current selected language code and remove the language code from this URL.

SIMILAR TOPICS

wordpress amp link not translateDec 31, 2016 10:11 amReplies: 12Post by: besybuy
GT doesn't work...error 404 pageJan 28, 2019 5:36 pmReplies: 1Post by: vincenzodinuzzo
Translate website to any specific language, on page loadJan 19, 2019 6:49 amReplies: 1Post by: Leaon7756
Add links to all translated posts on every Wordpress postJan 14, 2019 8:51 pmReplies: 5Post by: ptsniper
Joomshaper Pagebuilder buttons Link edit problemJan 11, 2019 10:04 amReplies: 1Post by: kumatest

Try GTranslate with a free 15 day trial