Problem:
The client is using the chauffeur booking system plugin and has issues with translating the plugin into Croatian and English using .po files. They encountered an error indicating that the function
_load_textdomain_just_in_time
was called incorrectly, suggesting that translations were loaded too early in WordPress.
Solution:
1. We identified that the error related to
_load_textdomain_just_in_time
is a known issue with the latest WordPress core, not directly related to WPML. For more details, see the errata page: https://wpml.org/errata/php-error-wp-6-7-notice-function-_load_textdomain_just_in_time-was-called/
2. We recommended increasing the WordPress memory limit to at least 128MB, which can help with processing translations. This can be done by adding the following code to the wp-config.php file:
/* Memory Limit */<br />define('WP_MEMORY_LIMIT', '256M');
3. To import .PO files using String Translation, follow the guide here: https://wpml.org/documentation/getting-started-guide/string-translation/#import-export-po-files
4. To make the plugin's strings available for translation in WPML, go to WPML -> Theme and plugins localization, select the plugin, and scan it for strings. The strings should then appear in WPML -> String Translation.
If this solution does not resolve your issue or seems outdated, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket at WPML support forum.