Ajax filter resets language

Popular automatic website translation tool

Ajax filter resets language

Postby olegthered » Mon Feb 01, 2016 5:51 pm

Hello,
when i change category via ajax filter my language choice resets
tracers.ru/archive

Oleg
olegthered
 
Posts: 79
Joined: Thu Feb 26, 2015 11:52 am

Re: Ajax filter resets language

Postby Edvard » Wed Feb 03, 2016 8:27 am

Hi,

You have this form:

Code: Select all
<form action="http://en.tracers.ru/archive/" method="post" class="searchandfilter" data-sf-form-id="17942" data-is-rtl="0" data-results-url="http://tracers.ru/archive/" data-ajax-url="http://tracers.ru/?sfid=17942&sf_action=get_results" data-ajax-form-url="http://tracers.ru/?sfid=17942&sf_action=get_form" data-use-history-api="1" data-template-loaded="0" data-lang-code="" data-ajax="1" data-ajax-target="#search-filter-results-17942" data-ajax-links-selector=".pagination a" data-update-ajax-url="1" data-only-results-ajax="1" data-scroll-to-pos="0" data-auto-update="1" id="search-filter-form-17942" autocomplete="off">


You will need to change data-results-url, data-ajax-url, data-ajax-form-url attributes to be relative or to include the language code like in action attribute. This attributes are not standard attributes like action, that's why they are not getting replaced with appropriate language domain automatically.

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: 4179
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Ajax filter resets language

Postby olegthered » Wed Feb 03, 2016 4:08 pm

I do not know where I should make these changes. Can you help me?
olegthered
 
Posts: 79
Joined: Thu Feb 26, 2015 11:52 am


Re: Ajax filter resets language

Postby olegthered » Thu Feb 04, 2016 12:32 pm

Sent
olegthered
 
Posts: 79
Joined: Thu Feb 26, 2015 11:52 am

Re: Ajax filter resets language

Postby Edvard » Thu Feb 04, 2016 8:59 pm

Hi,

I have changed /www/tracers.ru/wp-content/plugins/search-filter-pro/public/includes/class-search-filter-display-shortcode.php file which fixed the issue. You may search for gtranslate fix inside of the file to see the changes.

If you decide to update search-filter-pro plugin make sure that after update the changes are not lost.

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: 4179
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Ajax filter resets language

Postby olegthered » Thu Feb 04, 2016 9:08 pm

Hi,
Edvard I went to tracers.ru/archive chose english lang then change category in dropdown and language reset.
olegthered
 
Posts: 79
Joined: Thu Feb 26, 2015 11:52 am

Re: Ajax filter resets language

Postby Edvard » Thu Feb 04, 2016 9:29 pm

OK, this time it is loading the content using ajax which responds with JSON format. But the site URL doesn't change as before. We just need to define how to translate your JSON objects.

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: 4179
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