This thread is resolved. Here is a description of the problem and solution.
Problem:
The client is developing a website using WPML and needs to switch the primary language from English to Swedish but encountered errors during the process.
Solution:
If you're experiencing similar issues when trying to change the primary language in WPML, we recommend following these steps:
1) Navigate to WPML>>Languages in the left sidebar.
2) In the "Site Languages" section, click on "Change default language".
3) Select your new default language from the list.
4) Click 'Save Changes'.
5) Go to Settings>>Permalinks and resave the settings.
If the problem persists or the solution seems irrelevant due to being outdated or not applicable to your case, we highly 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 needed, please open a new support ticket for further assistance at https://wpml.org/forums/forum/english-support/.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.