Title: Problems with translating AJAX strings
Last modified: November 22, 2019

---

# Problems with translating AJAX strings

 *  Resolved [boredtaiga](https://wordpress.org/support/users/boredtaiga/)
 * (@boredtaiga)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/problems-with-translating-ajax-strings/)
 * Hey!
 * My problem is only with some specific dynamic strings and I can’t make a connection.
 * Whenever I try to translate dynamic AJAX strings, they work just fine while I’m
   in the editor’s interface (they’re showing in their supposed language, in this
   case, Hungarian), although when I jump back to live view of my website, the translations
   will be shown in the original language (English). If I jump back to the translation
   interface, they’ll be shown in Hungarian again.
 * What could the issue be?
 * Shown on pictures: [https://imgur.com/a/rc5hkIX](https://imgur.com/a/rc5hkIX)
   
   For some reason, as you can see the first picture, all the other strings are 
   translated correctly, but the “Min. Price” and “Max. Price” doesn’t for some 
   strange reason. And it only happens when you change tabs from “Kiadó” to “Eladó”.

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [Dragos](https://wordpress.org/support/users/dragosvrejiu/)
 * (@dragosvrejiu)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/problems-with-translating-ajax-strings/#post-12173138)
 * Hello,
 * Thank you for reporting this. Here are some steps to debug this:
 * * see if you have any javascript errors in the browser console [https://codex.wordpress.org/Using_Your_Browser_to_Diagnose_JavaScript_Errors](https://codex.wordpress.org/Using_Your_Browser_to_Diagnose_JavaScript_Errors).
   A printscreen could help.
    * if you have any security or minification plugins
   please deactivate them and try again. Some caching plugins also have minification
   settings that can break javascript code, so for testing purposes please disable
   any caching as well. * try and open the website in a different browser just to
   exclude a browser add-on that might interfere with javascript.
 * Let me know how this goes.
 * Best regards,
 *  Thread Starter [boredtaiga](https://wordpress.org/support/users/boredtaiga/)
 * (@boredtaiga)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/problems-with-translating-ajax-strings/#post-12175613)
 * Hello,
 * Thank you for your answer. My problem still exists.
 * These are the screenshots of the console:
 * > [debug](https://imgur.com/a/NxV0nuo)
 * Thanks,
    boredtaiga
 *  [Dragos](https://wordpress.org/support/users/dragosvrejiu/)
 * (@dragosvrejiu)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/problems-with-translating-ajax-strings/#post-12176895)
 * Hi,
 * Can you please visit TranslatePress -> Settings -> Advanced
 * Then, enable these features 1 by 1 in this order and try to see if it makes a
   difference. Also please disable or clear the cache if you have any.
 * 1. Fix missing dynamic content
    2. Disable dynamic translation 3. Fix spaces 
   between HTML attributes 4. Fix broken HTML
 * Also, can you please send me a link of your website ?
 * Best regards,
 *  Thread Starter [boredtaiga](https://wordpress.org/support/users/boredtaiga/)
 * (@boredtaiga)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/problems-with-translating-ajax-strings/#post-12179864)
 * Hi,
 * I tried your steps, but sadly nothing seemed to help the problem.
 * During the debug process I have noticed that it does actually translate the string,
   but it is rather showing it in the wrong language.
 * The natural strings that I have used are in the English language, but if I set
   the TranslatePress plugin’s English translation field to something else it will
   show that string instead of the one in the script even when my language settings
   are set to Hungarian.
 * In this example the natural string is “Min Price”, I set the English field in
   TranslatePress to “Test” and the Hungarian to “Min. ár”, but when I change my
   language to Hungarian it will be showing the “Test” text instead of “Min. ár”.
 * The website address is: [https://ingatlan.unicool.hu/hu/](https://ingatlan.unicool.hu/hu/)
 * Thanks for your help!
 *  Thread Starter [boredtaiga](https://wordpress.org/support/users/boredtaiga/)
 * (@boredtaiga)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/problems-with-translating-ajax-strings/#post-12179939)
 * `[27-Nov-2019 07:34:34 UTC] WordPress database error Table 'mydbname.wp_2_trp_dictionary_en_us_en_us'
   doesn't exist for query SELECT original,translated, status FROM`wp_2_trp_dictionary_en_us_en_us`
   WHERE status != 0 AND`original`!= 'Min Price' AND MATCH(original) AGAINST ('Min
   Price' IN NATURAL LANGUAGE MODE ) LIMIT 3 made by do_action('wp_ajax_trp_get_similar_string_translation'),
   WP_Hook->do_action, WP_Hook->apply_filters, TRP_Translation_Memory->ajax_get_similar_string_translation,
   TRP_Translation_Memory->get_similar_string_translation`
 * ^This is an error I get in debug.log when trying to translate either “Min Price”
   or “Max Price”
    -  This reply was modified 6 years, 5 months ago by [boredtaiga](https://wordpress.org/support/users/boredtaiga/).
 *  [Dragos](https://wordpress.org/support/users/dragosvrejiu/)
 * (@dragosvrejiu)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/problems-with-translating-ajax-strings/#post-12180813)
 * Hello,
 * I have checked your site and there seems to be no problem with the translations.
 * Have you solved the issue?
 * Best regards,
 *  Thread Starter [boredtaiga](https://wordpress.org/support/users/boredtaiga/)
 * (@boredtaiga)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/problems-with-translating-ajax-strings/#post-12180893)
 * Hello,
 * No, sadly, the problem is still present.
 * You can only see it in action if you set your language to Hungarian and then 
   go to the front page where the map is and next to the map click on the “Eladó”
   text so it switches to the next tab.
 * Then the dynamic strings won’t translate as you will see.
    -  This reply was modified 6 years, 5 months ago by [boredtaiga](https://wordpress.org/support/users/boredtaiga/).
 *  Thread Starter [boredtaiga](https://wordpress.org/support/users/boredtaiga/)
 * (@boredtaiga)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/problems-with-translating-ajax-strings/#post-12196508)
 * Hello,
 * I was wondering if you managed to find where the problem is? Do you have any 
   idea what could cause an anomaly like this?
 * Thanks,
    boredtaiga
 *  Thread Starter [boredtaiga](https://wordpress.org/support/users/boredtaiga/)
 * (@boredtaiga)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/problems-with-translating-ajax-strings/#post-12203625)
 * I’ve managed to solve this issue in the script by using the $TRP_LANGUAGE global
   variable. For some reason, the variable resulted in the wrong language (en_US
   in every case), when called inside the specific php files where the ajax scripts
   executed from. What I did was to store the $TRP_LANGUAGE’s value from the page
   where it worked, using $_SESSION and calling the $_SESSION value inside the ajax
   script. This way I managed to manually translate the untranslatable values.
 * Although I still don’t know what caused this issue, this is a good bandaid with
   anyone who’s experiencing problems like this.
 * boredtaiga

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Problems with translating AJAX strings’ is closed to new replies.

 * ![](https://ps.w.org/translatepress-multilingual/assets/icon.svg?rev=3166541)
 * [TranslatePress - Translate Multilingual sites with AI Translation](https://wordpress.org/plugins/translatepress-multilingual/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/translatepress-multilingual/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/translatepress-multilingual/)
 * [Active Topics](https://wordpress.org/support/plugin/translatepress-multilingual/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/translatepress-multilingual/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/translatepress-multilingual/reviews/)

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)
 * [problem](https://wordpress.org/support/topic-tag/problem/)
 * [strings](https://wordpress.org/support/topic-tag/strings/)
 * [translating](https://wordpress.org/support/topic-tag/translating/)

 * 9 replies
 * 2 participants
 * Last reply from: [boredtaiga](https://wordpress.org/support/users/boredtaiga/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/problems-with-translating-ajax-strings/#post-12203625)
 * Status: resolved