Great multilingual plugin
-
Hi all,
I have a WP website that supports two languages – English and Hebrew.
Almost 3 weeks ago I started noticing an issue that happened out of the blue, coming and going, in which the Hebrew translation was suddenly not shown, and when switching to English (the default language) the URL in the address bar was appended with the text ‘#TRPLINKPROCESSED‘. Refreshing the page didn’t solve the issue.During testing I discovered that the page (the HTML) was injected with the erroneous text ‘#!trpst#trp-gettext‘ in various elements. I’m not sure exactly why it happened, but I knew it was related to TranslatePress’s (TP’s) translation of theme and plugin strings (Gettext strings). So I wanted to stop TP from doing Gettext translations going forward, and also ignore the existing Gettext translations that were already done and saved in the database.
These were the steps of the solution for me:
- I checked the option Disable translation for gettext strings in TP settings. (Doing this by itself didn’t really solve the issue, as it was back the next day.)
- I checked the option Exclude from dynamic translation in TP settings. (The issue kept coming back.)
- So I wanted to make TP completely ignore Gettext strings, both existing and new, by excluding the conflicting parts. So I did this:
- I identified all elements with the erroneous text ‘#!trpst#trp-gettext‘ on the page, by searching for this text in Chrome DevTools – Elements tab (HTML view). This was the Gettext translation stuff that was breaking the page…
- For each such ‘#!trpst#trp-gettext’ instance I found it’s context, meaning whether it’s related to the theme or to a certain plugin.
- I looked in the database (via phpMyAdmin) at the Gettext table for Hebrew, and searched its ‘domain‘ column for the “TP way” of calling the theme and plugins.
- I added domain exclusion in TP settings for the theme and relevant plugins, in the Exclude Gettext Strings section. Note that I only used the ‘domain‘ field, leaving the ‘Gettext String’ field empty. This way I was telling TP to exclude ALL Gettext strings related to the theme/plugin. I did that for the theme and for each relevant plugin, one by one, and then saved the changes.
- The next day, all ‘#!trpst#trp-gettext’ instances were gone except for two, so I excluded them in TP settings (in Exclude selectors from translation option) by their CSS IDs.
- In further testing the issue was not seen again. (-:
So that was the way this issue was solved for me. I hope sharing it can help others in similar situations.
I also wanted to say that I really like what the TranslatePress team did in regards to the TranslatePress Editor. It makes the translation work flow so easy, which is awesome.
I plan on continue using it in my future projects.One final note is about TranslatePress support:
At the beginning there was a significant delay in TranslatePress’s response times, which was very frustrating for me, and I wrote a 1 star review.
BUT they (Denis) explained that this unfortunate delay happened in the context of a holiday time, in which many people were away from work.
So it became much more understandable. From that point on they got back to me in a timely manner, and helped me in addressing my issue.
So in spite of the bumpy beginning, I do recommend TranslatePress, and I updated my rating to 5 stars. I do enjoy using their plugin. It makes the task of making your site multilingual so much easier and fun. I plan on continue using it in my future projects. (-:
- The topic ‘Great multilingual plugin’ is closed to new replies.