The Grid ... Translations

Hi There, we have the problem to translate some phrases within TheGrid Plugin. And Tools like Loco and other fail to translate, because those tools found at least 3 different “mo” files which they could not handle. So, what could we do?.
These are the Phrases we need to be translated:

  1. “Load More” translate in “Lade mehr”
  2. “Loading” translate in “Lade”
  3. “Search” translate in “Suche”
    … and “yes” we have produced the necessary .po and .mo files. But nothing happens!

And we have tried the “hard version” via PHP… but even this failed:

add_filter(‘gettext’, ‘x_translate_text’ , 20, 3);
function x_translate_text ( $translated_text, $text, $domain ) {

$translated_text = str_ireplace("Load More", 'mehr laden', $translated_text);
$translated_text = str_ireplace("Loading", 'lade', $translated_text);
return $translated_text;

}

Could you please help on this?!
Daniel

Hi there,

To translate strings from The Grid you should use .po/.mo files located in the-grid/langs/ folder.
You also need to setup WordPress your language if it’s not already the case: https://make.wordpress.org/polyglots/handbook/

.po/.mo files must be named like this (prefixed by “tg-text-domain”):

- tg-text-domain-fr_FR.po
- tg-text-domain-fr_FR.mo

These files can be added directly in the grid folder : /the-grid/langs/
Or to preserve translation after an update directly in: /wp-content/languages/plugins/ (since Wordpress v3.7)

And you can easily edit these files with Poedit software: https://poedit.net/

You can also use a 3rd party plugin to easily translate strings like WPML plugin.The Grid is compatible with WPML.

As you’ve mentioned that you took to PHP route and could not translate the case I wonder if there is a cash plug-in on your website try to purge all caches in the website and test again.

Thank you.

As you can read, we have already inserted the .po/.mo files in exact this format!

  • tg-text-domain-fr_FR.po
  • tg-text-domain-fr_FR.mo

OR have I to individualize the File-Name? Is it: tg-xwork.goodtimespost-de_DE.po? Or something like that.
Here you will find my problem: http://xwork.goodtimespost.de/the-grid/
By the way… Even if I use WPML the is no translation for “load more” BUT for other strings like “No Comments” - this is now translated correctly!

Hi there,

Thank you for writing in. The Load More button itself is not translatable and you need to set proper name from The Grid options.

Please kindly go to the Edit view of the grid you are using and click on Ajax/Load option and you will see the Button Text setting to change the wording of the Load More:

Thank you.

Great that you find this solution for us! Thank you so much…

You are most welcome. :slight_smile: