Title: Shortcode block translation
Last modified: October 28, 2024

---

# Shortcode block translation

 *  Resolved [netschmiede24](https://wordpress.org/support/users/netschmiede24/)
 * (@netschmiede24)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/shortcode-block-translation/)
 * Hi,
 * I am using WooCommerce on a German website selling tickets for flea markets, 
   so every “product” is actually a “date” when this flea market happens. The markets
   are in several different cities and I have a product category for each of these
   cities.
 * Now I have overview pages for each of these cities to explain the location etc.
   On the bottom of these pages, I am using the shortcode [products category=”xxx”]
   to display all the dates where a flea market will happen in this city.
 * Now, if there is currently no date scheduled, the shortcode will display the 
   general notice “No products were found matching your selection.” – translated
   to German: “Es wurden keine Produkte gefunden, die deiner Auswahl entsprechen.”
 * I want to change this to “No DATES were found..” (“Es wurden keine TERMINE gefunden…”)
 * I am using LocoTranslate for these things. **I have trouble finding the right
   place where this translation is stored.** There are two strings in the WooCommerce
   Plugin which have this sentence. I changed them both – but the output on the 
   website is still “no products” instead of “no dates”.
 * **Is there a different location for the translation of the shortcode content?**
 * Please advise, thanks!
 * Astrid

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [chris2201](https://wordpress.org/support/users/chris2201/)
 * (@chris2201)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/shortcode-block-translation/#post-18100406)
 * Moin, 
   das lässt sich mit einem Snippet lösen:
 * add_filter( ‘gettext’, ‘translate_woocommerce_strings’, 999, 3 );
 * function translate_woocommerce_strings( $translated, $untranslated, $domain ){
 * if ( ! is_admin() && ‘woocommerce’ === $domain ) {
 *  switch ( $translated ) {case ‘keine Produkte’ :
    $translated = ‘keine Termine’;
   break;}}return $translated;}
 *  Plugin Support [shahzeen(woo-hc)](https://wordpress.org/support/users/shahzeenfarooq/)
 * (@shahzeenfarooq)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/shortcode-block-translation/#post-18100427)
 * Hi there!
   WooCommerce typically uses a shared function to display the “No products
   were found” message across different parts of the site, including shortcodes 
   and product listing pages.
 * However, If some of your translated strings don’t show up as expected on your
   WooCommerce site, the first thing to check is if these strings have both a **
   Single** and **Plural** form in the _Source text_ section.
 * If this is the case, then it is necessary to translate both these forms for your
   translation to work as expected. To do this, please **use Loco Translate’s Single
   and Plural tabs** that show up in the translation section towards the bottom 
   of screen, as pictured below.
 * ![](https://i0.wp.com/woocommerce.com/wp-content/uploads/2024/04/Single_Plural_Loco_Translate-
   1-edited.png?ssl=1)
 * Also, can you make a screenshot of how this translation appears in the woocommerce-[
   lang]_[LANG].**po** file?
   Alternatively, if you only need to change specific 
   text, you can use the Say What? plugin. This plugin lets you replace text without
   needing to edit the WordPress.com `.po` file directly.For more details you can
   use this artilce. [https://woocommerce.com/document/woocommerce-localization/#translate-or-replace-default-text](https://woocommerce.com/document/woocommerce-localization/#translate-or-replace-default-text)
   Thank you for your cooperation and understanding.
 *  Thread Starter [netschmiede24](https://wordpress.org/support/users/netschmiede24/)
 * (@netschmiede24)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/shortcode-block-translation/#post-18101859)
 * There is no singular/plural tab for German translations. Here is a screenshot
   of the woocommerce_de_DE.po file:
 * ![](https://i0.wp.com/www.rieder-maerkte.de/wp-content/uploads/2024/10/woocommerce_de_1-
   e1730191125569.jpg?ssl=1)
 * And here is the translations, I added:
 * ![](https://i0.wp.com/www.rieder-maerkte.de/wp-content/uploads/2024/10/woocommerce_de_2-
   e1730191138318.jpg?ssl=1)
 * But as you can see, for example on this link: [https://www.rieder-maerkte.de/standort/dueren-obi/](https://www.rieder-maerkte.de/standort/dueren-obi/)(
   at the bottom), the shortcode still displays “Es wurden keine Produkte gefunden.”
 * Next attempt was to use the “Say What” Plugin that you suggested. I set it up
   as follows:
 * ![](https://i0.wp.com/www.rieder-maerkte.de/wp-content/uploads/2024/10/saywhat_1.
   jpg?ssl=1)
 * Unfortunately this doesn’t change a thing.
 * Any other ideas? The snippet that [@chris2201](https://wordpress.org/support/users/chris2201/)
   mentioned doesn’t work either.
 * Thanks,
   Astrid
    -  This reply was modified 1 year, 7 months ago by [netschmiede24](https://wordpress.org/support/users/netschmiede24/).
 *  Plugin Support [shahzeen(woo-hc)](https://wordpress.org/support/users/shahzeenfarooq/)
 * (@shahzeenfarooq)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/shortcode-block-translation/#post-18102525)
 * Hi there!
   I have tried to change the error message on my test site using local
   translate and I’m able to translate that text, as shown in the below screenshot:
   [https://go.screenpal.com/watch/cZ6UIjncrIx](https://go.screenpal.com/watch/cZ6UIjncrIx)
   Here is the result what we are seeing on my test site. [https://go.screenpal.com/watch/cZ6UI6ncr2e](https://go.screenpal.com/watch/cZ6UI6ncr2e)
   Could you please make sure there is no update available for the translation in
   the update list. you can do this by following these steps:
    1. Go to to **Dashboard > Updates**.
    2. Scroll to the bottom and click **Update Translations**.
       After that please try
       to clear your browser cache and then try to check if your issue resolved.
 * After that, please clear your browser cache and check if the issue is resolved.
 * If you’re still unable to change the text, please open a support ticket with 
   the plugin here: [Loco Translate Support](https://wordpress.org/support/plugin/loco-translate/).
 * You can include the link to this ticket in your new support request so that the
   team has all the information needed to assist you further.
 *  Thread Starter [netschmiede24](https://wordpress.org/support/users/netschmiede24/)
 * (@netschmiede24)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/shortcode-block-translation/#post-18106883)
 * Thanks – no translation updates are available. I just opened a support ticket
   with Loco Translate and hope they can help.
 *  [ckadenge (woo-hc)](https://wordpress.org/support/users/ckadenge/)
 * (@ckadenge)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/shortcode-block-translation/#post-18108163)
 * Hi [@netschmiede24](https://wordpress.org/support/users/netschmiede24/),
 * > I just opened a support ticket with Loco Translate and hope they can help.
 * It’s a good step that you’ve opened a support ticket with Loco Translate. Please
   keep us updated on what they have to share. While you’re awaiting their response,
   we’re here to assist you with any WooCommerce related issues you may be experiencing.
 *  Thread Starter [netschmiede24](https://wordpress.org/support/users/netschmiede24/)
 * (@netschmiede24)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/shortcode-block-translation/#post-18117157)
 * Well, that wasn’t helpful at all. See here: [https://wordpress.org/support/topic/woocommerce-shortcode-block-translation/#post-18106980](https://wordpress.org/support/topic/woocommerce-shortcode-block-translation/#post-18106980)
 * Do you have any other idea?
 * Thanks,
   Astrid
 *  Plugin Support [shahzeen(woo-hc)](https://wordpress.org/support/users/shahzeenfarooq/)
 * (@shahzeenfarooq)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/shortcode-block-translation/#post-18120252)
 * Hi there!
 * I understand how important it is for you to translate that message. I’ve found
   that by default, when using the shortcode to display a category, no error message
   appears if no products are assigned to that category.
 * It seems like a third-party plugin or custom code on your site may be displaying
   the error message when no products are assigned to the category. This could be
   why the Say What? plugin and Loco Translate aren’t working as expected.
 * To translate the error message, you’ll need to identify which plugin or your 
   site theme is generating it. Here’s a simple test you can do:
    1. Deactivate all plugins except WooCommerce and Loco Translate.
    2. Activate a default theme like Storefront.
    3. Check if the error message appears when using the shortcode.
 * If the error message no longer appears, it likely comes from your theme files
   or a third-party plugin. Here is the guide you help you how find which plugin
   generating that error message. [https://woocommerce.com/document/how-to-test-for-conflicts/](https://woocommerce.com/document/how-to-test-for-conflicts/)
 * Alternatively, you could use custom code to translate the error message. However,
   since we don’t provide support for custom coding, you may need to handle this
   solution on your own.
 *  If you need more in-depth support or want to consider professional assistance
   for customization, I can recommend [WooExperts](https://partners.woocommerce.com/English/marketplace/)
   and [Codeable.io](https://woocommerce.com/codeable/) as options for getting professional
   help. Alternatively, you can also ask your development questions in the [ WooCommerce Community Slack](https://woocommerce.com/community-slack/)

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Shortcode block translation’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 9 replies
 * 4 participants
 * Last reply from: [shahzeen(woo-hc)](https://wordpress.org/support/users/shahzeenfarooq/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/shortcode-block-translation/#post-18120252)
 * Status: resolved