Closed ipajen closed 1 year ago
Added picture where translation is showing up incorrectly under plugins - troubleshooting
Maybe @swissspidy can help here?
From what I can see at a glance is that the way the code is loaded in the plugin causes the just-in-time translation logic in WP to trigger before the current user locale is known.
This is because the main plugin file loads a bunch of classes which get immediately instantiated before plugins_loaded
, and these classes call __()
:
Doing all the main plugin initialization only on plugins_loaded
would solve this.
Feature request/bug description
WordPress: 6.2 PHP: 8.2.3 Server: LiteSpeed Database: mysqli (Server: 10.4.28-MariaDB / Client: mysqlnd 8.2.3) Browser: Edge 111.0.1661.62 (Windows 10/11) Theme: GeneratePress 3.3.0 Health Check & Troubleshooting 1.6.0
Got a issue with languages in Health check
Site Language = English US and User Profile Language = English Status, Info, Troubleshooting, Tools
Site Language = English US and User Profile Language = Swedish Status, Info, Felsökning, Verktyg
Site Language = Swedish and User Profile Language = English US Status, Info, Felsökning, Verktyg
Site Language = Swedish and User Profile Language = Swedish Status, Info, Felsökning, Verktyg
When site language are Swedish and User Profile Language are English US the wrong language is shown in the Troubleshooting, Tools?
Site Language = English US and User Profile Language = Swedish The headers are translated but not the text. See pictures
Site Language = Swedish and User Profile Language = Swedish The headers are translated and text. See pictures
Screenshots
Is this a visual related ticket? If so, please include one or more screenshots to help us better understand what is happening.