Title: Plugin string translations ineffective
Last modified: July 29, 2021

---

# Plugin string translations ineffective

 *  Resolved [pewgeuges](https://wordpress.org/support/users/pewgeuges/)
 * (@pewgeuges)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/plugin-string-translations-ineffective/)
 * Hi,
 * I use two plugins that are correctly configured for string translation, strings
   show up in Polylang’s string translation pane, are translated, but the translated
   pages still show the default strings as configured in the plugins’ settings pages.
   And it happens not only to me, this is a cross-user, cross-site, cross-plugin
   problem.
 * See for **Footnotes:** [https://wordpress.org/support/topic/reference-container-heading-translations-and-a-collapse-feature/](https://wordpress.org/support/topic/reference-container-heading-translations-and-a-collapse-feature/)
 * This [https://wordpress.org/plugins/footnotes](https://wordpress.org/plugins/footnotes)
   plugin ships with a wpml-config.xml file for the reference container label.
 * For **Table of contents plus** [https://wordpress.org/plugins/table-of-contents-plus](https://wordpress.org/plugins/table-of-contents-plus)
   this is the configuration added so far:
 *     ```
       <wpml-config>
       	<admin-texts>
       		<key name="toc-options">
       		    <key name="heading_text" />
       		</key>
       	</admin-texts>
       </wpml-config>
       ```
   
 * The issue is **not** solved by assigning every language a unique number as in
   [https://github.com/polylang/polylang/issues/109](https://github.com/polylang/polylang/issues/109)
 * Should this be escalated to GitHub as it looks like a bug, although it’s incredible
   that this would not have been reported and fixed before.
 * So my assumption is that it takes more than adding a wpml-config.xml file to 
   get a plugin with configurable strings to work smoothly with Polylang?
    -  This topic was modified 4 years, 10 months ago by [pewgeuges](https://wordpress.org/support/users/pewgeuges/).
    -  This topic was modified 4 years, 10 months ago by [pewgeuges](https://wordpress.org/support/users/pewgeuges/).
    -  This topic was modified 4 years, 10 months ago by [pewgeuges](https://wordpress.org/support/users/pewgeuges/).
    -  This topic was modified 4 years, 10 months ago by [pewgeuges](https://wordpress.org/support/users/pewgeuges/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplugin-string-translations-ineffective%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/plugin-string-translations-ineffective/#post-14714185)
 * Hello,
 * Plugins must also follow best practices. One of the most important in the WordPress
   ecoystem is “Do nothing before the `plugins_loaded` action is fired”. Why? Because
   everything done before this action can not be filtered by other plugins.
 * I tested Footnotes. It loads its option before the action ‘plugins_loaded’. As
   Polylang waits for this action to setup the language and the options filters,
   teh option is not filtered.
 * If I delay the initialization of the Footnotes plugin to hook it to the `plugins_loaded`
   action, then the translation of teh option works as expected.
 * I did not test the other plugin, but I suppose it’s the same issue.
 *  Thread Starter [pewgeuges](https://wordpress.org/support/users/pewgeuges/)
 * (@pewgeuges)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/plugin-string-translations-ineffective/#post-14717246)
 * [@chouby](https://wordpress.org/support/users/chouby/),
 * Thank you very much for testing the Footnotes plugin and for your advice and 
   insight.
 * As I failed to implement the solution according to [https://polylang.pro/dont-take-any-action-before-plugins_loaded-is-fired/](https://polylang.pro/dont-take-any-action-before-plugins_loaded-is-fired/),
   I’ve ended up applying the quick fix just hooking initialization on `plugins_loaded`
   in footnotes.php:
 *     ```
       /**
        * Allows other plugins to filter the options.
        *
        * @since TBD [after 2.7.3]
        * @contributor @chouby
        * @link https://wordpress.org/support/topic/plugin-string-translations-ineffective/#post-14714185
        */
       add_action( 'plugins_loaded', function() {
   
       	// Initialize the Plugin.
       	$g_obj_mci_footnotes = new Footnotes();
       	// Run the Plugin.
       	$g_obj_mci_footnotes->run();
   
       } );
       ```
   
 * Code based on current v2.7.3 [https://plugins.trac.wordpress.org/browser/footnotes/tags/2.7.3/footnotes.php?rev=2521062#L117](https://plugins.trac.wordpress.org/browser/footnotes/tags/2.7.3/footnotes.php?rev=2521062#L117)
 * While loading translations is already hooked on `plugins_loaded`, loading options
   surprisingly is not.
 * I’ll report back on Footnotes’ forum (done, see [https://wordpress.org/support/topic/reference-container-heading-translations-and-a-collapse-feature/#post-14717295](https://wordpress.org/support/topic/reference-container-heading-translations-and-a-collapse-feature/#post-14717295))
   and just escalated it to [https://github.com/markcheret/footnotes/issues/189](https://github.com/markcheret/footnotes/issues/189)
 * Being committed to fixing Footnotes and while I hadn’t got enough time to contribute
   to TOC+ as well, I didn’t try the same in the latter either, hoping it will be
   done after reporting to TOC+.
 * Many thanks.
    -  This reply was modified 4 years, 10 months ago by [pewgeuges](https://wordpress.org/support/users/pewgeuges/).
    -  This reply was modified 4 years, 10 months ago by [pewgeuges](https://wordpress.org/support/users/pewgeuges/).
    -  This reply was modified 4 years, 10 months ago by [pewgeuges](https://wordpress.org/support/users/pewgeuges/).
      Reason: Add a docblock
    -  This reply was modified 4 years, 10 months ago by [pewgeuges](https://wordpress.org/support/users/pewgeuges/).
    -  This reply was modified 4 years, 10 months ago by [pewgeuges](https://wordpress.org/support/users/pewgeuges/).

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

The topic ‘Plugin string translations ineffective’ is closed to new replies.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

## Tags

 * [string translation](https://wordpress.org/support/topic-tag/string-translation/)

 * 2 replies
 * 2 participants
 * Last reply from: [pewgeuges](https://wordpress.org/support/users/pewgeuges/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/plugin-string-translations-ineffective/#post-14717246)
 * Status: resolved