Title: Translation loading
Last modified: June 26, 2026

---

# Translation loading

 *  [dingonobru](https://wordpress.org/support/users/dhumeurvegetale/)
 * (@dhumeurvegetale)
 * [1 week, 2 days ago](https://wordpress.org/support/topic/translation-loading-5/)
 *     ```wp-block-code
       Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-statistics domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later.
       ```
   
 * Hi. Got this message in my debug log thousand times…. but when i look your code
   it seems to be loaded in the ‘plugins_loaded’ hook by the ‘plugin_setup’ function
   and loaded with the ‘init’ hook; Is there a way for me to fix this. Thanks

Viewing 1 replies (of 1 total)

 *  Plugin Author [Mostafa Soufi](https://wordpress.org/support/users/mostafas1990/)
 * (@mostafas1990)
 * [3 days, 23 hours ago](https://wordpress.org/support/topic/translation-loading-5/#post-18953174)
 * Hi,
 * Thanks for the detailed report, and you are right: WP Statistics loads its text
   domain on the init hook, which is the correct place.
 * This notice appears whenever any translated string for the wp-statistics text
   domain is requested before init runs. The catch is that the message always names
   the domain (wp-statistics) even when the early call is actually fired by another
   plugin or theme that touches one of our strings during plugins_loaded. So the
   warning naming “wp-statistics” does not always mean the early call comes from
   inside our plugin.
 * A couple of things worth knowing:
    - It is a debug notice only. It is written to debug.log when WP_DEBUG / WP_DEBUG_LOG
      is enabled. It does not affect tracking, your stored statistics, or the front
      end.
    - We have already moved a number of early-translated strings in recent releases,
      so please update to the latest version first. On many sites that alone clears
      it.
 * If it still shows after updating, could you help me pin down the exact source
   by sharing:
    1. Your WP Statistics version and WordPress version.
    2. The full block of lines from debug.log right after the warning (the backtrace).
       That backtrace names the exact file and function that triggered the early translation,
       which tells us whether it is us or another plugin, and lets us fix the precise
       string.
 * With that backtrace I can trace it to the exact line and get it cleaned up.
 * Best regards,

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftranslation-loading-5%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/wp-statistics/assets/icon.svg?rev=3081064)
 * [WP Statistics – Simple, privacy-friendly Google Analytics alternative](https://wordpress.org/plugins/wp-statistics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-statistics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-statistics/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-statistics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-statistics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-statistics/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mostafa Soufi](https://wordpress.org/support/users/mostafas1990/)
 * Last activity: [3 days, 23 hours ago](https://wordpress.org/support/topic/translation-loading-5/#post-18953174)
 * Status: not resolved