Skip to content Skip to sidebar

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_languages` (`code`, `english_name`, `major`, `active`,  `default_locale`, `tag`, `encode_url`, `country`) VALUES ('es-pe2', 'English Name', '1', '0', 'es_PE', 'es-pe2', '0', NULL);

INSERT INTO `wp_icl_languages_translations` (`language_code`,  `display_language_code`, `name`) VALUES ('es-pe2', 'en', 'English name'), ('es-pe2', 'es-pe2', 'English name');

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.

Tagged: 

This topic contains 36 replies, has 0 voices.

Last updated by Lucas Vidal de Andrade 4 months, 3 weeks ago.

Assisted by: Lucas Vidal de Andrade.

Author Posts
November 24, 2025 at 12:41 pm #17604858

florianF-18

And we need to solve this problem of language mapping because we want automatic translation.

Languages-‹-BrokerCheck-—-WordPress-11-24-2025_06_40_PM.png
November 24, 2025 at 1:17 pm #17604998

florianF-18

also adding on what the developer just sent you I spoke to the hoster and the confirmed there is server side caching but only if the litespeed plugin is activated. If its disabled there is no server side caching.

He asked if you can provide any error message that he can look into.

I just check both sites (staging + live site) both dont have it enabled currently. Even though we need to have it enabled in the future as its our optimization plugin.

Thanks for your help!

November 24, 2025 at 2:20 pm #17605215

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: Europe/Vienna (GMT+02:00)

Thank you for sharing.

P.S.: please do not share access credentials directly as messages, since this Forum might become public in the future.

I've tried accessing your live website, but none of the credentials I have work. Can you please share access to it again? Please use the proper form and don't send it as messages. This way, I can manually create the languages. If I can't, I'll tell you how you can do it yourself.

November 25, 2025 at 8:11 am #17606821

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: Europe/Vienna (GMT+02:00)

Unfortunately, again you shared your credentials publicly on your last message. Please change or delete this user, as the access to your website has been made public at least 2 times on this ticket, and your website might be compromised.

I'm looking into the website and will get back shortly about the issue.

November 25, 2025 at 11:09 am #17607570

florianF-18

how can i enter private data? i dont have the option right now. Its really confusing your ticket system. Also I just received another critical error via email.
Can we get this fixed now? i am waiting for weeks now. If we dont get this moving i want to request a refund and we switch to translatepress. Thank you for your understanding!

November 25, 2025 at 1:56 pm #17608356

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: Europe/Vienna (GMT+02:00)

I've enabled the fields, let me know if it worked this time.

I understand your frustration. I'm pushing on second tier as hard as I can, but I haven't received a working-workaround from them. The steps they gave me to add the languages via DB didn't work, and now I'm currently waiting for their feedback. I'll update you ASAP.

Regarding the fatal error, I've created a new ticket for it. This way, we can keep things organized and work the issues in parallel. I'll answer you there:

https://wpml.org/forums/topic/split-fatal-error-3/

Thank you for your patience.

November 27, 2025 at 12:08 pm #17614787

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: Europe/Vienna (GMT+02:00)

Hello there,

Here are the instructions to manually add the languages to the DB:
hidden link

Here's the command I ran:

INSERT INTO `wp_icl_languages` (`code`, `english_name`, `major`, `active`,  `default_locale`, `tag`, `encode_url`, `country`)
VALUES ('es-pe2', 'English Name', '1', '0', 'es_PE', 'es-pe2', '0', NULL);

INSERT INTO `wp_icl_languages_translations` (`language_code`,  `display_language_code`, `name`)
VALUES ('es-pe2', 'en', 'English name'), ('es-pe2', 'es-pe2', 'English name');

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');

You can substitute the language code "es-pe2", the default locale "es_PE" and "es_pe", and the "English name", which is the title of the language.

Please ensure to have a backup before proceeding, as this is a delicate process. Let me know if you have any questions.

I'm still checking for a permanent solution with 2nd tier. Thank you for your patience.

November 28, 2025 at 4:32 am #17617098

florianF-18

This is my PHP My Admin folder. You didn't show in the video which folder I should put the code inside.There are many databases here. Do I have to select the database for the website I am working on?

business1-bhx-zumedns-com-localhost-phpMyAdmin-5-2-2-11-28-2025_10_27_AM.png
November 28, 2025 at 4:49 am #17617116

florianF-18

And should I place the code you gave in the SQL folder?

November 28, 2025 at 10:57 am #17617817

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: Europe/Vienna (GMT+02:00)

Hey there,

I apologize, I was not aware of your DB structure. You need to run the command inside the brokercheck.co's DB.

One easier way to follow the steps, is that you use the WP Adminer plugin, which is the one I used. Install it on your website, and it should look a lot more like the video, and will be easier to follow the steps. It's accessible from the Tools tab, once active.

I'm not sure where this can be run from the PhpMyAdmin interface. You can reach out to your hosting support as well, they can indicate the best way to apply the solution on your server. Let me know if you still have any questions.

November 28, 2025 at 2:20 pm #17618366

florianF-18

I need to run the command inside the brokercheck.co's DB also I know PhpMyAdmin interface but But there is a specific folder or file in which I can place the custom codes you gave me.I need to know the name of that folder or file.Can you tell me this?

I am able to find the database of my desired website but after selecting the database I need to confirm in which folder or file I will write the codes you have given. It needs to be written for WPML so can my hosting providers also tell me in which folder I have to write the codes?

business1-bhx-zumedns-com-localhost-brokerch_bcco-phpMyAdmin-5-2-2-11-28-2025_08_08_PM.png
November 30, 2025 at 3:28 pm #17620605

florianF-18

Can you solve this problem if I provide you hosting access or an FTP account for the main website?

December 1, 2025 at 7:13 am #17621396

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: Europe/Vienna (GMT+02:00)

Hey there,

Honestly, I don't totally understand the questions about the folder. The commands need to be run for specific tables, which are specified in the command itself already. Just run the command on the DB (of course it's necessary to adjust the prefix).

I can do that for you, sure. The fields are enabled for you to share access privately.

December 1, 2025 at 3:32 pm #17623179

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: Europe/Vienna (GMT+02:00)

Hello there,

I was able to access. Thank you.
Just one last thing: what's the DB's name of the website you want to add the languages to?

If you don't know it, please send me access to the website, again. Fields are enabled.

December 1, 2025 at 4:17 pm #17623357

florianF-18

Send me a private message form to send login details.