Skip Navigation

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 24 replies, has 4 voices.

Last updated by Bruno 3 years, 8 months ago.

Assisted by: Bruno.

Author Posts
June 9, 2020 at 10:11 am #6329381

keithS-10

We would like to change the 'en' extension within a site's url.

June 10, 2020 at 5:20 am #6337885

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi There,

The hreflang is changeable but the language code cannot be changed after a language has been added.

However, you can create a new "custom" language with the desired language code.

1. Go to WPML->Language->Edit languages
2. Add a new custom language with the custom language code
3. Once it has been added you can now use the Translation Management dashboard to bulk duplicate from the "old" English to the "new" English you just added
4. Remove the old language and start using the new custom one

NOTE: To use the same default locale you will need to first change the English default locale before adding the new language and save. Then add the original default locale to the new custom language.

Let me know your results, please.

June 10, 2020 at 6:02 am #6337979

keithS-10

Thanks Bobby – this could work (i see uk is used for Ukraine – would it be problematic to use uk extension?). Also, looking at options, is it possible to remove the hreflang tag altogether for the global site (in this case 'en'), yet keep the tags for the other regional sites once created?

June 10, 2020 at 5:58 pm #6344681

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

As Ukraine language is using the language code 'uk' it's not possible to add it to a new custom language.

You could potentially load the Ukraine language and switch the default locale to an English supported one along with the hreflang as well and the language name.

Unfortunately you cannot remove the hreflang through WPML, maybe it's possible by using custom code or a third party plugin but it's not possible through WPML.

June 12, 2020 at 2:14 pm #6360229

keithS-10

Based on this ticket, please could you confirm the following screenshot is accurate before proceeding to duplicate the site to achieve the new url code. Does the 'Default locale' column highlighted need to be anything specific to ensure compatibility/SEO?

Also, is there a quick way to duplicate pages/site, other than jumping into translation screens?

Screenshot 2020-06-12 at 15.01.58.png
June 12, 2020 at 5:15 pm #6360983

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi There,

The default locale is used for localization purposes between your site and WordPress, therefore it is important to try and use a locale that is recognized by WP and plugins.

en_GB is the official locale. In order to use it try the following:

1. Change en_GB to en_EN and save
2. Change en_UK to en_GB and save

Now to batch duplicate go to WPML->Translatation Management
Filter and select all necessary content and select "Duplicate" into the new new language.

Let me know your results, please.

June 12, 2020 at 8:14 pm #6361777

keithS-10

Bobby – i'll need urgent assistance to help correct this site. The duplication worked and everything seemed fine but suddenly the templates have blown apart. Are you able to investigate?

June 12, 2020 at 9:07 pm #6361957

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Is this happening on just the duplicated versions or all translations?

I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)

**Before we proceed I recommend taking FULL BACKUP of your database and your website.**
I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/

You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.

NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.

Thank you,
Bobby

June 12, 2020 at 11:43 pm #6362533

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

What are your results when you re-add the old English language and set it to "Hidden", do those fields show up again in the media?

Regarding the notice, this is a normal notice when editing the page builder view without using the Editor.

You can select "Never show this warning again" and it wont show it again.

June 15, 2020 at 7:57 am #6370795

keithS-10

To confirm, our site is back and working under the new custom /gb code as expected.

We found that we had to reset most of Elementor's template settings – they were causing the site layout to breakdown previously. The theme activation disconnected also due to the url being unrecognised (which makes sense after losing the /en).

However, since removing our default en language code (which the site was originally built on) we are seeing a residue of file information. Please see the screen shots attached – you'll notice the system is stating we have 96 Elementor templates, when actually it's only 49, plus the WMPL 'media translation' area shows broken 'en' images (although the media is working fine and visible on the new /gb default). Are we able to tidy this up somehow?

Many thanks for the support.

Screenshot 2020-06-14 at 21.53.36.png
Screenshot 2020-06-14 at 21.55.34.png
June 15, 2020 at 4:52 pm #6376197

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

Please go to WPML => Support , and click on "Troubleshooting" while in the Troubleshooting page please perform the actions. (specifically "set language information" but I recommend performing all of them"

Once you perform the troubleshooting actions, let me know if the count issue fixes.

For the broken image in the backend, if possible right click on it and inspect it.

Share with me the URL that the image is pointing to.

June 17, 2020 at 7:46 pm #6396737

keithS-10

Thanks, we have now setup a duplicate site to check, but we're still seeing multiple entries after performing the troubleshooting settings. The original English default is still essentially in the background – this page demonstrates the 'English' (original files) and the 'United Kingdom' (new default language).

Screenshot 2020-06-17 at 20.41.53.png
June 17, 2020 at 11:30 pm #6397739

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Correct, the original "English" will be in the background but should not show in the front end.

The only way to remove that would be by manually removing all the previous translations , which is not necessary. You can simply ignore them and the site will continue working as expected, or you can manually remove them.

The new language is a separate language therefore it does not overwrite the original English.

June 18, 2020 at 11:13 am #6402651

keithS-10

Ok thanks – our site is to be pushed hard over the next week to populate the content for 2 additional languages. The worry is with the deleted original language code the content was first allocated to (following your instructions on the very first thread), the now duplicate language default will run into problems. I only say this because our duplicate site has crashed whilst experimenting – we clicked 'translate independently' on the duplicate language home page default and the whole site has now gone into a 404 with the initial message 'The response is not a valid JSON response.'

We could live with all the ghost entries and broken links in the system if it was going to be stable, but my instinct is saying we need to resolve this breakdown before moving forward.

Are you able to investigate further?

June 19, 2020 at 4:53 pm #6414071

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

You have essentially replaced your site's default language with a new one, it is expected that some hardcoded entries will need to be updated manually in order to resolve any broken links type of errors.

Regarding the new issue you mentioned with the 404 when trying to translate , does this happen only with the homepage? or all pages?

I have tried using the token but It takes me to a 404 page.Is this part of the issue or is the token just expired?

The next reply is going to be private in case you need to share it with me again.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.