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.

Our next available supporter will start replying to tickets in about 1.78 hours from now. Thank you for your understanding.

This topic contains 3 replies, has 2 voices.

Last updated by Jamal 3 months ago.

Assigned support staff: Jamal.

Author Posts
July 17, 2019 at 11:26 am #4229429

kevinS-10

Hello Jamal,

Thanks for you response, we are make the whole site with Elementor Pro without ACF so now my site is Translated perfectly.

But now i have a small issue will you please give me quick response on this because my site is live now.

My client change main domain to .com domain and my sites default language is da( Danish ),
So my client want /da/ in domain also for default language like another languages.
But when i add this then it works fine but when we run .com/ then blank page is displayed, its not redirected to .com/da/

So will you please give a quick response on this.

July 17, 2019 at 11:34 am #4229467

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

This totally possible, please see our article on this feature.
https://wpml.org/documentation/getting-started-guide/language-setup/directory-default-language/

Then you can create a redirect depending on what you have chosen for the root page.
Please see this answer from a similar ticket.
https://wpml.org/forums/topic/directly-redirect-to-language-specific-homepage/#post-585558

I'll remain at your disposal.

Best regards,
Jamal

July 17, 2019 at 11:44 am #4229597

kevinS-10

I tried these mentioned solution for my issue but i can't resolve.

Why i need to add root page for this can i use my Homepage as root page so when a user go to .com then its redirect to .com/da and displayed my sites homepage.

how this possible?

July 17, 2019 at 1:07 pm #4230301

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

You can use a WordPress page as root page(/), but you cannot use the homepage as root page and also have it served under /da/.

You can also make the redirect using a WordPress template which will use "wp_redirect(home_url('da'));" and assign that template the WordPress page that you use as the root page.

You can also create the redirect through a PHP code, check this message https://wpml.org/forums/topic/redirecting-root-page-to-my-en-language-homepage/#post-899823

You can also create a redirect in server level(apache or nginx).

Would it be possible to allow me temporary access to the website to check this further?

Best regards,
Jamal

The topic ‘[Closed] use language code in url for root page’ is closed to new replies.