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.
|September 29, 2018 at 9:22 pm #2775805|
It would be nice if WMPL would have "Codes" fields in settings, where we could insert header/body/footer scripts like Google Analytics.
This fields should be available for any active language.
This way we could start a different script for any language that has been selected in front-end, and it's especially useful when we have a different domain/language.
I know that it's possible to achieve the same using if statements in php, but this would be a cleaner and comfortable way.
|October 2, 2018 at 2:22 am #2779975|
Languages: English (English ) Portuguese (Brazil) (Português )
Timezone: America/Sao_Paulo (GMT-03:00)
Thank you for contacting and suggestion.
I can forward your ticket to our developers so they can check this out. At the moment, however, you can use the "Insert Headers and Footers" plugin (https://wordpress.org/plugins/insert-headers-and-footers/).
Then in WPML > Settings > Custom XML Configuration, insert these lines:
<wpml-config> <admin-texts> <key name="ihaf_insert_header" /> <key name="ihaf_insert_footer" /> </admin-texts> </wpml-config>
By following these steps, you should be able to translate the content into WPML > String Translation. By following the steps above, this should work correctly.
Please, let me know if I can help with any other questions you may have. I'll be happy to help.
|October 2, 2018 at 9:55 am #2780957|
Thanks for the tip.
Being a Toolset user I used another approach.
Now I simply translate this fields and it works.