How to translate date/time strings

The PRO version of our Google Reviews WordPress Plugin automatically pulls the correct time strings in all languages. You do not need to translate anything.

The free plugin comes with translations out of the box for different languages:

  • English
  • French
  • Spanish
  • German

If our language is not on this list, and you want to display date/time strings in your own language, we recommend using a translation plugin like LocoTranslate.

Use a plugin like LocoTranslate

  • Install LocoTranslate
  • Select LocoTranslate >> Plugins
  • Click on “Embedder for Google Reviews Premium”
  • Click “Add new language”
  • Choose your language
  • Click “Start translating”
  • Now search for the text that you want to translate

You can also use a translation editor like Poedit and upload your translation file via FTP.

Filter the date/time strings via PHP

For some languages, you need to re-arrange the date/time strings, in order maintain the correct grammar. You can achieve this by using this filter hook.

add_filter( 'grwp_filter_time_string', 'filter_time_string', 10, 3);
function filter_time_string( $time_string, $string, $diff ) {

    $time_string = 'Lorem Ipsum';
    return $time_string;

Updated on June 18, 2024
Scroll to Top

25% off for new customers