I have no caching or similar on the website. So it’s not that…
Are you certain about that? A lot of hosts apply server-level caching that can be pretty aggressive, especially on shared hosting plan. If you don’t run your own hosting from the ground up, I would suggest that you verify that there is no server-level cache or if there is one, make sure it has been cleared.
The steps you outlined are correct, and to be clear, the plugin checks the WP languages directory first – it only check its own directory if WP’s load_textdomain()
does not return true when attempting to load from the WP language folder. And (as I usually do, especially at times where there has been a plugin update), I verified here locally this is working as intended.
I have to circle back to server-level caching as the most likely issue. I’ve been known to be wrong from time to time but having verified locally that translation is working as intended, this is the most likely culprit.
If not, then the items to check are that you are absolutely 100% certain that your file name is wp-members-da_DK.mo with the correct hyphens/dashes and underscores. You’ve indicated it as correct in your post, but double check it in actual fact because when applying a file manually, that’s the problem more often than not.
You could also use the wpmem_localization_file
filter to trap the file result to see if what it’s looking for is what it should be. Use the filter to write the unfiltered $file
value to the screen to know if it’s actually looking at where it should be. The default path is built from WP_LANG_DIR
as a starting point, so if your install alters this that’s a point to look into.
On a related note, because it’s a WP process to load the translation file, there are native WP filters and actions in that process that allow for any other plugin or customization to hook into. It starts with get_locale()
, runs the filter plugin_loacle
and lastly runs load_textdomain()
which has a number of potential actions in it. If you are absolutely 100% certain that there is no server-level cache and that your translation file is correct and that your naming of the file is correct, then I’d recommend you deactivate other plugins to test using a clean WP default theme to see if something external is hooking into one of those possible points.
-
This reply was modified 3 years, 2 months ago by
Chad Butler.