Title: plugin strings do not get translated
Last modified: January 13, 2017

---

# plugin strings do not get translated

 *  [candy2012](https://wordpress.org/support/users/candy2012/)
 * (@candy2012)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/plugin-strings-do-not-get-translated/)
 * Hi,
    I have a stupid plugin which is supposed to work when a different language
   is defined. But it doesn’t!
 * I found some text strings hardcoded inside the code, and which stay the same,
   in English, no matter which language is selected.
 * Here’s the code:
    `if ( $tax_total_display == ‘itemized’ ) {
 *  foreach ( $tax_string_array as $tax_string ) {
 *  // Tax included.
    if ( $tax_display == ‘incl’ ) {
 *  $tax_line = sprintf(
    /* translators: %s: tax included */ __( ‘Includes %s’,‘
   woocommerce-german-market’ ), $tax_string ); $tax_line_class = ‘wgm-tax includes_tax’;
 *  } else { // Tax to be added.
 *  $tax_line = sprintf(
    /* translators: %s: tax to be added */ __( ‘Plus %s’, ‘
   woocommerce-german-market’ ), $tax_string ); $tax_line_class = ‘wgm-tax excludes_tax’;}
 *  // Append tax line to total.
    $tax_total_string .= sprintf( ‘<br class=”wgm-
   break” /><span class=”%s”>’, $tax_line_class ); $tax_total_string .= $tax_line;
   $tax_total_string .= ‘</span>’; }
 * I am talking about those “Includes %s” or “Plus %s” strings ….
 * Could you help?
 * Thanks!

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

 *  [maxime](https://wordpress.org/support/users/max345/)
 * (@max345)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/plugin-strings-do-not-get-translated/#post-8651057)
 * Hello,
 * This code looks fine, I think the localization is correct. Maybe the translation
   files (.mo and .po) are missing? Or maybe this code is called too soon, before
   the plugins initialize. But I need the whole code to figure out.
 *  Thread Starter [candy2012](https://wordpress.org/support/users/candy2012/)
 * (@candy2012)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/plugin-strings-do-not-get-translated/#post-8651156)
 * There are some localization files in there, but they are obviously not called
   out …
    I can send you the plugin if you give me an address …
 * Thanks a lot
 *  [maxime](https://wordpress.org/support/users/max345/)
 * (@max345)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/plugin-strings-do-not-get-translated/#post-8651174)
 * Yes you can send me the plugin at my address: [maxime4@gmail.com](https://wordpress.org/support/topic/plugin-strings-do-not-get-translated/maxime4@gmail.com?output_format=md),
   I’ll have a look.
 *  Thread Starter [candy2012](https://wordpress.org/support/users/candy2012/)
 * (@candy2012)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/plugin-strings-do-not-get-translated/#post-8651227)
 * Thanks so much! I’ve just send it, it should be with you

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

The topic ‘plugin strings do not get translated’ is closed to new replies.

 * ![](https://ps.w.org/sublanguage/assets/icon-128x128.png?rev=1197494)
 * [Sublanguage](https://wordpress.org/plugins/sublanguage/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sublanguage/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sublanguage/)
 * [Active Topics](https://wordpress.org/support/plugin/sublanguage/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sublanguage/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sublanguage/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [candy2012](https://wordpress.org/support/users/candy2012/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/plugin-strings-do-not-get-translated/#post-8651227)
 * Status: not resolved