I have a website, that loads some scripts with translations. On the dev environment everything works great, but on the stageing, the wrong language is loaded.
Just before wp_set_script_translations I checked determine_locale() and get_locale(), and both return the correct language (en_GB).
But for some reason the staging server returns the default language of WP (de_DE)
add_action('wp_enqueue_scripts', function () {
wp_enqueue_script('plek-gallery-handler', PLEK_PLUGIN_DIR_URL . 'js/components/gallery-handler.js', ['jquery', 'plek-language', 'wp-i18n'], $plek_handler->version);
wp_set_script_translations('plek-gallery-handler', 'plekvetica', PLEK_PATH . "/languages");
});
Query Monitor shows in both cases the correct language:
On the stageing server the wrong file gets loaded:
Any ideas why this happens?
I checked determine_locale() and get_locale(), and both return the correct language (en_GB).
2