Why can't you translate JSON responses?

Popular automatic website translation tool

Why can't you translate JSON responses?

Postby clickfwd » Thu Jun 25, 2015 5:34 pm


I am the developer of JReviews and we recommend your extension to clients as the most viable solution to create a multilingual site. However, more and more clients come back to us telling us that some parts of JReviews are not translated and that your reply is that we should change our code to respond with HTML instead of JSON. I read some other posts here where you say the same thing.

Why is that? JSON is very commonly used as a reply to AJAX requests and it is more efficient than returning HTML because the payload is smaller, which makes for faster requests, and because the results can be easily parsed and processed on the browser using javascript. I understand that it is more comfortable for you to just limit doing a mass translation on HTML, but you could also take your product to the next level and process JSON.

You already intercept the request response so you could convert the JSON object to an ARRAY, then translate the values in the array. You could even go as far as letting clients specify which "key names" in the array should not be translated, and to take it further you could let clients specify which types of JSON requests based on URI format should be translated and which left alone.

As developers of a very complex product for almost 10 years now we don't see how moving towards 100% responses in HTML is the future and we are not able to re-write our code to move backwards. On the other hand, we believe that since you are in the business of intercepting responses and manipulating the data you could probably provide added value by also supporting the translation of requests that return a JSON response.

I hope that you seriously consider this as it could further improve your already great product and make it 100% compatible with all extensions. Maybe there are technical limitations as to why you can't translate JSON and if that's the case it would also be good to know exactly what these are so clients understand that the limitation is a technical one.

I tried to find a contact email no your site to write to you directly, but I couldn't find one so forgive me for posting this in the forum.

Posts: 3
Joined: Thu Jun 25, 2015 5:22 pm

Re: Why can't you translate JSON responses?

Postby Edvard » Thu Jun 25, 2015 11:32 pm


Thanks for contacting me and your kind words.

There is no general way to translate JSON object, because if we translate all JSON key values, most likely it will break the javascript. There is no general solution to know which keys should be translated and which not, because we provide general translation to all kind of applications including JReviews and I'm sure that many key names are general and can be used by many applications.

May be we can work together and you can add some specific key names in your JSON responses, so we can detect and translate specified key values. For example you may add gt_translate_keys key inside your JSON responses, which will include the list of keys we may translate. That way we can detect the keys and translate the mentioned values.

I think that it will be better to solve this between us developers and do not confuse users.

Let me know.


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

Re: Why can't you translate JSON responses?

Postby clickfwd » Thu Jun 25, 2015 11:37 pm


I think for users it's good to have a general understanding of the challenges. Let me know how to reach you directly so we can look into possible solutions.

Or use the contact us link at jreviews.com to get in touch with me.

Posts: 3
Joined: Thu Jun 25, 2015 5:22 pm

  • Related Topics
    Last post

Who is online

Users browsing this forum: No registered users and 1 guest