Skip Navigation

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 pitkin county 4 years, 5 months ago.

Assisted by: Bobby.

Author Posts
November 6, 2020 at 11:46 pm #7396801

pitkin county

I am working on a site built with the genesis framework and would like to add javascript to the body of a page. See the attached picture of where I added it. It works fine on the default language, but its completely missing in the translation of the page. Any help would be appreciated.

November 7, 2020 at 12:14 am #7396833

pitkin county

Bobby, Sorry I got a message that said I wouldn't get a response until Monday. Thanks for your response. I found what you requested. take a look at my image. I would love to be able to add a different script for each language, looks like this may be able to do that for me.

Screenshot_2020-11-06 Edit Page ‹ Pitkin County Covid Response Recovery — WordPress(2).png
November 7, 2020 at 12:42 am #7396975

pitkin county

Im hoping the _genesis_scripts_body will allow me to set another script to run on the translated page? I set it to translate. Where can I find it? string translation in the genesis domain? Im not finding it even after i scan the genesis domain for new strings.

November 9, 2020 at 9:31 pm #7411681

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi There,

Notice that "_genesis_scripts_body" is set to "Do not translate" (see your screeenshot)

If you switch it to :

- "Copy" then it will copy the same script from the default language to the translation every time

- "Copy once" it will copy the first time but it will not allow you to add a translation within the Translation Editor (side to side)

- "Translate" allows you to add a translation, meaning a different script per language possibly

Let me know your results, please.

November 9, 2020 at 9:39 pm #7411691

pitkin county

Bobby,

I set _genesis_scripts_body to translatable and sent the page for translation. When in the advanced editor, I don't see the script to be translated? Where do I go to translated the script? I also can't find it in string translation.

Screenshot_2020-11-09 Edit Page ‹ Pitkin County Covid Response Recovery — WordPress.png
November 9, 2020 at 9:51 pm #7411725

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

When in the Advanced Translation Editor on the top left corner there is an option to search source.

Within that search box search for your custom JS.

You should be able to find it now