Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem: I am using the WP Job Manager plugin, that comes with the WorkScout theme.

When browsing jobs, the user can apply for a job through a form. I am using Contact Form 7 for that. Unfortunately, I just noticed I can only assign one form in Job Listings > Settings > Contact a Job Form (see attachment). So for all languages, only one form in one language will be displayed.

Solution: Theme options are "translatable" following the relevant documentation.

Relevant Documentation: https://wpml.org/documentation/getting-started-guide/translating-theme-options/

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

Last updated by antonioI 4 years, 2 months ago.

Assigned support staff: Otto.

Author Posts
August 7, 2017 at 10:45 am #1336301

antonioI

Hello, I am using the WP Job Manager plugin, that comes with the WorkScout theme.

When browsing jobs, user can apply for a job through a form. I am using Contact Form 7 for that. Unfortunately I just noticed I can only assign one form in Job Listings > Settings > Contact a Job Form (see attachment). So for all languages only one form in one language will be displayed. This because from my understanding, with Contact Form 7 each form in each language has to be a separate form. But under the Job Listings settings I can only select one. Is there a workaround for that?

wpjobs.jpg
August 7, 2017 at 5:39 pm #1336801

Otto
Supporter

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thank you for contacting the WPML support!

For being of better help, can you please provide your WPML Debug information in the debug field below? http://wpml.org/faq/provide-debug-information-faster-support/

Theme options are "translatable", so maybe translating the selected contact form does the trick.

Please try to follow these steps do it:
https://wpml.org/documentation/getting-started-guide/translating-theme-options/

Let me know your results, please.

Kind Regards,

Otto

August 7, 2017 at 7:34 pm #1336902

antonioI

This is an option in the plugin, not in the theme, where you can select a form from Contact Form 7. Those contact form 7 don't translate dynamically, I can only add separate forms for each separate language, but in the plugin I can only select one form.

This was the answer from the theme developer, which is not the plugin developer anyway. "WorkScout is not WPML compatible theme (and not advertised anywhere as it). I guess that would require custom modification of Contact Listing plugin so it would use certain form based on the current language, which technically is possible, but you'd need to hire someone to help you with that."

To resolve the issue, it would be enough if I could switch language for the page settings /wp-admin/edit.php?post_type=job_listing&page=job-manager-settings so that I could select a different form for each language. I see the flags at the top of the settings page, but even if I save a different form when I switch language, it's always the same form, so I can't save different forms when switching flags in the settings. Or another solution would be if the same form could be translated in the String Translation, then the different language would switch automatically loading the same form. But from my understanding forms made with Contact Form 7 have to be created separately for each language.

August 7, 2017 at 8:01 pm #1336921

Otto
Supporter

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks for the information.

You are right, there is no way to translate the contact form using string translation.

And switching the language in the admin in most cases is not the proper way to set different options per language (sometimes it is though). WPML does not work that way.

The "right" way to do it is as I told you before:
https://wpml.org/documentation/getting-started-guide/translating-theme-options/

, it does not matter if the options are from a theme or a plugin.

May I take a deeper look to check if this is possible before sending the issue to our compatibility team?

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated.

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.

Maybe I'll need to replicate your site locally. For this I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok for you.

** IMPORTANT **

- Please make a backup of site files and database before providing us access.

- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:

hidden link

Kind Regards,

Otto

August 7, 2017 at 9:54 pm #1336979

antonioI

Hello, I have followed your instructions and got somewhere. Please check screenshots. So in those fields I have found job_manager_submit_job_form_page_id but it's empty, while I would assume it should have the CF7 shortcode. I also found job_manager_form_contact 310, where 310 is the form which is currently selected under the plugin settings, referring to [contact-form-7 id="310" title="PL - Apply for job"]. I assume if I could change that ID number in the translations, I could assign a different form for each language. However, none of the 2 options show in the String translation.

I have given you WP access with my previous message. Please take a look without Duplicator for now. Thank you.

2.jpg
1.jpg
August 8, 2017 at 1:18 pm #1337540

Otto
Supporter

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

It seems like changes in WPML > String Translation > Translate texts in admin screens are not taking effect. I visited the page again and those fields are still unchecked.

To workaround this, please do the following:
-Go to WPML > String Translation > Translate texts in admin screens select the field (I think the one that should be translated is the one with the value "310") and export it to a wpml-config.xml file (at the top of the page)
-If there is no wpml-config.xml file in the root of your Theme's folder, add the one you just downloaded. If there is one, edit it with the new field.

Let me know if this helped, please.

Kind Regards,

Otto

August 8, 2017 at 11:57 pm #1338001

antonioI

So I tried to export to a wpml-config.xml file from "String Translation > Translate texts in admin screens". Loader icon keeps spinning forever and nothing happens. So I tried to search how to create it manually, and come up with this.

<wpml-config>
<admin-texts>
<key name="installer_repositories_with_theme">
<key name="job_manager_form_contact" />
</key>
</key>
</admin-texts>
</wpml-config>

Could you please check if it's correct? Because it doesn't work, if I search with Strings I can't find "job_manager_form_contact" nor "310". So probably I didn't use correct tags.

My theme doesn't have any wpml-config.xml, can I place it in child theme root or it has to go on main theme root?

August 9, 2017 at 11:05 am #1338336

Otto
Supporter

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks!

You should add the file to the root of the child theme (and it shouldn't be present in the parent theme).

The file looks good, the first key can be removed I think:

<wpml-config>
  <admin-texts>
    <key name="job_manager_form_contact"/>
  </admin-texts>
</wpml-config>

Also, after uploading the file, deactivate and activate the theme again or scan it:
1. Go under “WPML -> Theme and plugins localization”
2. Make sure that “Translate the theme and plugins using WPML's String Translation” is active
3. Scroll down to “Strings in the theme” and click on “Scan the theme for strings”

Let me know if this helps, please.

Kind Regards,

Otto

August 9, 2017 at 5:07 pm #1338699

antonioI

It works!!! thank you so much