This thread is resolved. Here is a description of the problem and solution.
Problem: The client is unable to add a custom language to their WordPress site using the WPML plugin. They are looking for a way to enable custom languages manually. Solution: We recommend manually adding the languages to the database. Here are the steps to follow:
INSERT INTO `wp_icl_locale_map` (`code`, `locale`) VALUES ('es-pe2', 'es_pe');
INSERT INTO `wp_icl_flags` (`lang_code`, `flag`, `from_template`) VALUES ('es-pe2', 'es-pe2.png', '0');
Please replace 'es-pe2', 'es_PE', 'es_pe', and 'English Name' with your desired language code, locale, and language title. Ensure you have a backup before proceeding as this is a delicate process. If this solution does not resolve your issue or seems outdated, 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 further assistance is needed, please open a new support ticket at WPML support forum.
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.
Background of the issue:
I'm trying to add a custom language to my WordPress site using the WPML plugin. The issue can be seen on this page: hidden link
Symptoms:
I expected to be able to add a custom language, but I am not allowed to do so.
Questions:
Why am I unable to add a custom language using WPML?
Is there a specific setting or requirement I am missing to enable custom languages?
To be able to investigate the issue further, I need to create a copy of your website, so I can test solutions, check for conflicts without harming your live website. We usually do that by creating local copies, but the ones I created from your website were broken. In this case, I'd like to ask you to please create a staging version of the website - an exact copy of the production website.
You can leave the same user there, so you don't need to share credentials again. Please send the staging website link here, so I can access it. I know this takes some effort, so I appreciate your cooperation on this matter.
hey can you check it out soon? my developer told me he sent you the link but here it is staging-j.brokercheck.co just to make sure.. I really need this fixed as we cannot move forward without it and everything is on hold.. thanks so much for your help!
I didn't receive anything from your dev. I'm not sure how he could've contacted me, as this Forum is the only way to reach out.
Anyway, thanks for sharing. I've escalated your ticket, and I'm getting a second opinion with my colleagues. I'll keep you updated. Thank you for your patience.
It seems you missed my last message. If you want live support, please close this ticket and open a chat.
My recommendation is for you to continue support here, as it's very unlikely that another supporter will be able to solve this via chat. Please restore my user so I can proceed.
Thank you for sharing again. This might take few more days to get solved, there's a specific bug on your website, which's been hard for us to find so far. I've sent a copy of your website to our devs, for analysis, I'll keep informed.
Thank you for your patience so far. We are working hard to find a solution as soon as we can.
It seems that your Litespeed server caching configurations are interfering with WPML. Please disable server side caching (Object cache, opcache & etc) on his LiteSpeed server. I am not familiar with the options there, but all seems to be related to that.
You can reach out to your hosting support to ask them to disable that. Let me know if, after that, you can add the languages.
Hello wpml support team, These three language i have tried multple time to add but it is not allow me to add these three languages.I have deactivated the light speed total chace plugin and when I add these three languages it is being added but when I save it is white and nothing is coming up.Please help me add these three languages. My client needed it urgently but it has already taken a long time. A total of 30 languages were supposed to be added, out of which 27 have been added and I am unable to add these three languages in any way. Please help me by adding these three languages.I tried this on the staging site.
Language list:
**********
Peru
Chile
Argentinia
Staging site Login:
***************
[removed by support]
Note: I received an email like this, I think it was sent from my hosting.This targets the website on our main domain, but I think we should migrate it accordingly after completing the work on the staging site.
Howdy!
WordPress has a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.
In this case, WordPress caught an error with one of your plugins, WPML Multilingual CMS.
First, visit your website (hidden link) and check for any visible issues. Next, visit the page where the error was caught (hidden link) and check for any visible issues.
Please contact your host for assistance with investigating this issue further.
If your site appears broken and you can't access your dashboard normally, WordPress now has a special "recovery mode". This lets you safely login to your dashboard and investigate further.
hidden link
To keep your site safe, this link will expire in 1 day. Don't worry about that, though: a new link will be emailed to you if the error occurs again after it expires.
When seeking help with this issue, you may be asked for some of the following information:
WordPress version 6.8.3
Active theme: Bricks Child Theme (version 1.1)
Current plugin: WPML Multilingual CMS (version 4.8.4)
PHP version 8.2.29
Error Details
=============
An error of type E_ERROR was caused in line 504 of the file /home/brokerch/brokercheck.co/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Arr.php. Error message: Out of memory (allocated 1008730112 bytes) (tried to allocate 20971520 bytes)
New threads created by Lucas Vidal de Andrade and linked to this one are listed below:
It seems you didn't understand my last message. What we need you to deactivate are the Litespeed server caching, from the server, not the plugin.. Also, please note that the name is Litespeed, not light speed. It's important that we stick to correct names here, to avoid confusions.
Please reach out to your hosting support and ask them to deactivate any caching. Let me know if ti works after that.
Also, as a workaround, if it still does not work, please send me the data from the three languages you want to add (code, hreflang, default locale), and I'll try to add them directly via the DB, while we don't solve the issue itself.