Popup message on language selection

Popular automatic website translation tool

Popup message on language selection

Postby johnoatwork » Sat Jan 24, 2015 9:28 pm

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
johnoatwork
 
Posts: 4
Joined: Sat Jan 24, 2015 7:30 am

Re: Popup message on language selection

Postby Yana » Sun Jan 25, 2015 11:46 pm

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
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4135
Joined: Thu Jan 12, 2012 6:21 pm

Re: Popup message on language selection

Postby johnoatwork » Mon Jan 26, 2015 5:05 am

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
johnoatwork
 
Posts: 4
Joined: Sat Jan 24, 2015 7:30 am

Re: Popup message on language selection

Postby Edvard » Mon Jan 26, 2015 1:36 pm

Hi John,

You may edit doGTranslate javascript function to trigger popup window or do anything else you wish.

Thanks!
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux