Skip to content

Conversation

@gouriphadnis0301
Copy link

This pull request addresses the i18n issue reported in #570, where plugin translations were not loading correctly when using language-related plugins.

The fix moves the load_plugin_textdomain() call from the plugins_loaded hook to the init hook. This ensures that WordPress
and all other localization plugins are fully initialized before the plugin's translations are loaded.

Changes include:

  • Updated the hook in set_locale() method of class-plugin-name.php from 'plugins_loaded' to 'init'.

This adjustment guarantees proper loading of translation files and
improves compatibility with multilingual setups.

@gouriphadnis0301
Copy link
Author

Please merge this PR into master.

Fix: Load plugin translations on 'init' hook instead of 'plugins_loaded' (#570 )

This PR ensures that plugin translations are loaded after WordPress and other localization plugins are fully initialized. Moved load_plugin_textdomain() from 'plugins_loaded' to 'init' in set_locale() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant