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 6 replies, has 2 voices.

Last updated by Noman 1 year, 7 months ago.

Assigned support staff: Noman.

Author Posts
February 20, 2018 at 8:01 pm #1524148

daniahA

Hello

how can add the language in the top right corner ?
my main navigation in the left side,but I wanted the language in top as it as appears in the images.

Thank you

February 21, 2018 at 7:50 am #1524490

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Daniah,

Thank you for contacting WPML Support. Please add the debug report in the Debug Information box. I have also enabled debug info box for your next reply: https://wpml.org/faq/provide-debug-information-faster-support/

Please provide the frontend link where I can see the issue.

Thank you

February 21, 2018 at 10:04 am #1524654

daniahA

Hi,
sorry about that I did not know what the debug info is. I added the images about what I am looking. I would really appreciate your help. I need to at in the top right corner as it appears in the image. I belive there is a code should be put there, but I am not good in coding and I did not know where to add it.

Thank you

February 21, 2018 at 10:34 am #1524695

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Daniah,

Please provide temporary access (WP-Admin & FTP) to your site so I can see your setup – preferably to a test site where the problem has been replicated if possible.

Your next answer will be private which means only you and I have access to it.

=== Please backup your database and website ===

✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important.

Thank you

February 22, 2018 at 9:17 am #1525901

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Daniah,

I have added following code in your child theme header.php file:

<div class="et_pb_row custom-lang-switch">
<?php do_action('wpml_add_language_selector'); ?>
</div>

And added following CSS in Appearance >> Customize >> Additional CSS section:

/* Custom Switcher */
.custom-lang-switch {
	 padding: 0;
    position: relative;
    z-index: 4;
}

.custom-lang-switch .wpml-ls {
    position: absolute;
    right: 0;
    z-index: 1;
}

.custom-lang-switch a {
	color: #000 !important;
}

And now it looks as in attached screenshot.

Here is doc for more details:
https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/#custom-locations

Thank you

February 23, 2018 at 9:19 pm #1527953

daniahA

Thank you so much for helping out!
I notice something after adding the code. The dropdown nav looks not align. The first one was the old without the language code and the 2nd one after adding the code. any suggestion please?

February 26, 2018 at 7:35 am #1528776

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Daniah,

Sorry, I can’t see similar issue at my side as you can in attached screenshot. Can you please clear your browser cache and let me know if you still find any issue.

Thank you

The topic ‘[Closed] add the language in the top right corner’ is closed to new replies.