Take your website
To the next level
Discover our newly launched customization services and elevate your web projects to new heights.
Delegate tasks, save time, and unlock the power of professional WordPress outsourcing.

Okay
  Public Ticket #1201190
Translating category overlay title
Closed

Comments

  • BaptisteJesu started the conversation

    Hi,

    I'd like to translate "Items" on product overlay titles (shop page) but I don't find anything in the .po files (wether the gem or woocommerce files).

    https://prnt.sc/fhv22k

    Could you help me with that ?

    Thanks


    Baptiste

  • BaptisteJesu replied

    I've actually managed to translate it from the .po file with poedit, but it only works from thegem folder.

    Is there a way to make it work from child theme ?

    Thanks

  •  7,122
    Oliver replied

    Hi!

    1. Take file languages/thegem.pot or xx_YY.po from theme directory.

    2. Open this file with Poedit software.

    3. Translate necessary strings to your language.

    4. In software open Catalog - Settings and set Language to Translation to xx_YY.

    5. Then save the file as thegem-xx_YY. (You must have two files thegem-xx_YY.po and thegem-xx_YY.mo.)

    6. These files you need to put to the wp-content/languages/themes of your site.

    With the same operation, you can translate TheGem elements plugin.

    Just put  translations in wp-content/languages/plugins

     

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • BaptisteJesu replied

    Hi,

    Thank you for your answer.

    I found how to make it work from the child theme, here is the code :

    // Load translation files from your child theme instead of the parent theme

    function my_child_theme_locale() {
        load_child_theme_textdomain( 'thegem', get_stylesheet_directory() . '/languages' );
    }
    add_action( 'after_setup_theme', 'my_child_theme_locale' );

    Baptiste

  •  7,122
    Oliver replied

    Thank you for letting now about this function. 

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver