Popup message on language selection
Jan 24, 2015 5:28 pm by johnoatwork
Jan 24, 2015 5:28 pm by johnoatwork
Hi Edvard, I'm using No Number modals on my site and I'd like to trigger a popup when a user selects a new language from Gtranslate. Seems like it should be fairly simple but I've been digging around and haven't been able to figure out how. The code to launch the modal looks like this:
{modal article=2|title=Translation and Interpretation|width=600|height=240}"Language Translations"{/modal}
Could you give me some tips on where I should place this?
Many thanks
John
Re: Popup message on language selection
Jan 25, 2015 7:46 pm by Yana
Jan 25, 2015 7:46 pm by Yana
Dear John,
You can detect current selected language and display popup 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
for GTranslate Enterprise you may detect the selected language by using _SERVER['HTTP_X_GT_LANG'] variable in PHP or just X-GT-Lang header variable if you use another platform
Re: Popup message on language selection
Jan 26, 2015 1:05 am by johnoatwork
Jan 26, 2015 1:05 am by johnoatwork
Hi Yana, thanks for getting back.
I'm happy to buy the pro version for the production web site but at the moment I'm just developing a proof of concept. I currently don't need to know which specific language is selected, just trigger a dialogue on selection of any language. A separate dialogue for each language will probably be handy later. Is there a way I can test that with the free version?
Regards
John
Re: Popup message on language selection
Jan 26, 2015 9:36 am by Edvard
Jan 26, 2015 9:36 am by Edvard
Hi John,
You may edit doGTranslate javascript function to trigger popup window or do anything else you wish.
Thanks!
SIMILAR TOPICS
Error message and URL problems | Feb 6, 2019 11:16 am | Replies: 1 | Post by: Kidbooo |
Large numbers of crawl errors with double language code | Jan 24, 2019 1:43 am | Replies: 1 | Post by: natastna2 |
Translate website to any specific language, on page load | Jan 19, 2019 6:49 am | Replies: 1 | Post by: Leaon7756 |
Error message on click on the widget | Jan 6, 2019 9:52 pm | Replies: 1 | Post by: jmric68 |
Graphic translation for every language is missing | Dec 19, 2018 7:54 am | Replies: 1 | Post by: Daryl Dixon |