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

Last updated by sebastianM-7 5 years, 4 months ago.

Assigned support staff: Bruno.

Author Posts
January 25, 2015 at 8:42 am #548432

sebastianM-7

Hi there,

I can't reply to the open threat "php code for manual language switcher not working?", the connection stops working - I tried different computers...
Please see my reply here:

Hi Bruno,

Thanks for your quick reply.
No, it doesn't work for any language. Please find a screenshot of my language page linked below (direct upload didn't work). You can see the code of the different languages. To me it looks like I have use the correct code, but please let m know if it should be something else.

hidden link

Many thanks for your help.
Regards,
Sebastian

January 26, 2015 at 4:30 pm #549125

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

I need to request temporary access (wp-admin and FTP) to your site - preferably to a test site where the problem has been replicated if possible - in order to be of better help.

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

Please let me know exactly what steps should I follow to see the problem.

Note: Please make a full backup of your site.

Thank you.

January 27, 2015 at 12:28 pm #549568

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

I fixed the problem. I used the code below to resolve the problem:

<!--
<?php if(ICL_LANGUAGE_CODE == 'en'): ?>
	ga('create', 'UA-51097835-1', 'auto');
<?php elseif(ICL_LANGUAGE_CODE == 'eur'): ?>
	ga('create', 'UA-51097835-2', 'auto');
<?php elseif(ICL_LANGUAGE_CODE == 'de'): ?>
	ga('create', 'UA-51097835-3', 'auto');
<?php elseif(ICL_LANGUAGE_CODE == 'aus'): ?>
	ga('create', 'UA-51097835-5', 'auto');
<?php endif; ?>
-->

Please let me know if this is working as intended.

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Thank you.

January 27, 2015 at 11:27 pm #549964

sebastianM-7

Hi Bruno,

Thanks for looking into it! Really appreciate it!
I will check it next, as I travel at the moment. I will close this threat for now.

Thank you so much for your help.
Sebastian