Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client created a custom language, Afrikaans, with the code af-za by mistake and needs it to be /af/ to match the site they are migrating. They have already translated content and cannot start over but are unable to change the language code in WPML.
Solution:
Unfortunately, you cannot directly change the language code of an existing custom language in WPML. However, you can preserve your translations by transferring them to a new custom language with the correct code. Here are the steps to do this safely:
1. Navigate to WPML → Languages and add a new custom language for Afrikaans with the correct code (/af/).
2. Manually transfer your translations from the old language code (af-za) to the new one (/af/).

If this solution does not apply to your case, or if it seems outdated, we recommend checking the 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 our 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.

This topic contains 1 replies, has 0 voices.

Last updated by Itamar 2 weeks ago.

Assisted by: Itamar.

Author Posts
September 17, 2025 at 8:27 am #17408379

geoffR-4

Background of the issue:
I created a custom language, Afrikaans, with the code af-za. It was an error, and it should have been /af/ to correspond with the site I am migrating. I have been translating the site for a while and cannot start again. I have tried updating the code via the WPML language settings but have not found where to make this change.

Symptoms:
I am unable to change the language code from af-za to /af/ in WPML.

Questions:
How can I change the language code from af-za to /af/ in WPML without losing my translations?

September 17, 2025 at 10:45 am #17409076

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

You asked: "My other question — 1. English is all that is required for our WP admin area. If the 'Theme plugins and localisation' is entirely relating to backend admin, I'd like to undo what I have done there 😉 as I told it to translate there, incorrectly, thinking it was part of the necessary site translation. Can I reset just that area?

You can change the admin language in your profile page in Users -> Profile. Please read more about it here: https://wpml.org/documentation/getting-started-guide/language-setup/setting-the-wordpress-administration-language/.

You also wrote: " Also trying now to distinguish the new Afrikaans from the original Afrikaans in the drop downs... I tried changing the name, but so far both are still showing as 'Afrikaans'. Mmm."

You can change the name of the language in WPML -> Languages -> Edit languages (link). Please read more about it in our guide here: https://wpml.org/documentation/getting-started-guide/language-setup/editing-wpmls-languages-table/.

Please let me know if you have any further questions about the main issue of this ticket - copying content from "af-za" to "af".

For the JetEngine custom MetaFields, please check the guide here: hidden link.
If you need further help with this issue, please open a new ticket in our support forum, as we try to focus on one issue per ticket.

If you need further help, please share your site's Debug information. You can read about it here: http://wpml.org/faq/provide-debug-information-faster-support/

Thanks,
Itamar.