Dies ist das technische Support-Forum für WPML - das mehrsprachige WordPress-Plugin.

Mitlesen können alle, doch nur WPML-Kunden können hier Fragen veröffentlichen. Das WPML-Team beantwortet Anfragen im Forum an 6 Tagen pro Woche, 22 Stunden am Tag.

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

Schlagwörter: 

This topic contains 2 Antworten, has 2 Teilnehmer.

Last updated by Claudio Donati vor 1 Jahr, 4 Monate.

Assigned support staff: Cristina.

Author Artikel
Mai 15, 2018 um 3:38 pm #2143720

Claudio Donati

Dear WPML-Team,

i would like to ask you if is possible to create a custom language Switcher like this: (see attachement) (its for German ITALIAN and ENGLISH)

Tanks 🙂

Mai 15, 2018 um 7:04 pm #2146430

Cristina

Hallo Claudio,

thanks for contacting.

There are two steps here:

To show the ISO language code (DE, IT, EN) instead of the language you can change in WPML >Languages > Edit languages the language name to what you want to show.

That is what the language switcher uses.

Regarding the separator, like this |, this is something the WPML language switchers do not provide .

The reason for this is that switchers are usually integrated in a theme navigation menu and inherit the style from the theme menus.

You have the option to apply your own custom CSS in the options for Additional CSS in WPML > Languages > Language Switcher Options applies only to the flags and texts of the switcher.

This means, that the language switcher is provided by WPML but all CSS is going to be controlled by your theme in the end output.

Therefore the CSS that can be applied in the options for Additional CSS in WPML > Languages > Language Switcher Options applies only to the flags and texts of the switcher.

If you are CSS savvy, you may include a separator in the theme stylesheets or via CSS to the switcher itself. But this is something you have to sort out on your theme and your site, as it is a custom coding.

You will find detailed information about language switchers on our documentation page:

https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/

https://wpml.org/documentation/getting-started-guide/language-setup/custom-language-switcher/

https://wpml.org/documentation/getting-started-guide/language-setup/designing-custom-language-switchers-using-template-files/

There have been some topics about this, but these solutions always are an inspiration, as you have to consider the singularities of your theme for desktop and mobile:

https://wpml.org/forums/topic/how-to-add-a-language-separator-2016/#post-898623
https://wpml.org/forums/topic/language-switcher-can-we-put-a-vertical-bar-between-en-de/#post-1362765

For any custom programming work for your site, we recommend contacting one of our certified partners .
=>https://wpml.org/documentation/support/wpml-contractors/

Kind regards,
Cristina

Mai 23, 2018 um 6:35 am #2212814

Claudio Donati

Thank you, now i have found a solution!