Background of the issue:
I am trying to update my PHP version to 8.0 or higher, as recommended by WordPress, but encounter issues when changing the language on my website from English to German.
Symptoms:
A critical error occurs when I change the language on my website from English to German after updating PHP to version 8.0 or higher. The error disappears when reverting to PHP 7.x.
Questions:
Why does a critical error occur when changing the language after updating PHP to 8.x?
How can I resolve the critical error related to PHP version changes?