Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 8.5.23, custom post, job title, translation, WPML
- This topic has 10 replies, 3 voices, and was last updated 8 years, 3 months ago by
Steven Zahm.
-
AuthorPosts
-
08/25/2016 at 7:26 am #387752
Greg Kett
ParticipantHi Steven,
I hope you are well.
Our client has their websites in 4 languages (eng, french, spanish, portuguese)
We just need to add their “Job Title” in each language.
We are using WPML for translations, and have raised this ticket with them as well.
When we use WPML “String Translation” to attempt to translate, we can only see the user/admin fields. We don’t want to translate the plugin itself. Just enter the job title for the Person, in some different languages.
Any experience with this process or advice that we should follow? At the moment it’s just in English for every site, with apparently no way of adding the other languages.
Many thanks
Greg
08/30/2016 at 11:28 am #388242Greg Kett
ParticipantHi Steve,
I believe my support ticket may have been missed as I see many others have been answered in the meantime.
Please could you give it some attention? I have spoken with WPML about the issue too, they find some strange behaviour from Connections custom post type/
Here is the thread:
https://wpml.org/forums/topic/fao-lauren-continuing-closed-thread-2/
Thank you
08/30/2016 at 1:07 pm #388310Steven Zahm
Keymaster@ Greg
Apologies! I somehow did miss this.
I’ve read the thread over in the WPML support forum…
I guess the first thing that needs to be clarified is that Connections is not a custom post type (CPT). Connections uses custom database tables instead for a couple reasons. One, Connections is older than the WP CPT feature. Two, and more importantly, the db schema of the custom tables are more optimized for directories whereas CPT’s are optimized for post content. This allows me to do things which are difficult is not possible if I were to use a CPT. This is very likely you are not seeing what you need to see in WPML.
Looking at the WPML developer docs, it seems, I think I would have to add specific support in the code for WPML support for user input as outline in their docs.
I could not find anything in their dev docs specifically outlining the procedure to add WPML support to plugins which use custom tables and with user input. I’m not able to ask questions in their support forum since I’m not a customer. If you could relay this question to them asking them to point me to the relevant docs. I can at least add initial support for the job title field.
If this will help them, the code to get and set the job title can be found in these two links:
- https://github.com/Connections-Business-Directory/Connections/blob/8.5.22/includes/entry/class.entry-data.php#L327
- https://github.com/Connections-Business-Directory/Connections/blob/8.5.22/includes/entry/class.entry-data.php#L1009
- https://github.com/Connections-Business-Directory/Connections/blob/8.5.22/includes/entry/class.entry-data.php#L1025
The actual data is retrieved and saved from the db using the WordPress wpdb API.
I hope this helps move this issue forward to resolution. Let me know what you find out.
08/31/2016 at 6:13 am #388413Greg Kett
ParticipantThanks Steven,
I will relay this to them and let you know what they come back with,
Greg
12/08/2016 at 8:50 am #402721Greg Kett
ParticipantHi Steven,
I hope all is good. This thread got lost for a while, but I’m keen to pick it up with you and WPML
In response to the above, WPML said:
===
“Let Steven know he could create a manual xml file with the set strings names which would force WPML to register them in the String Translation table. Then he would have to program the translation to force them to use his own domain.
The best way to get in touch with our developers to make this plugin compatible is to join our Go Global Program (https://wpml.org/documentation/theme-compatibility/go-global-program/). Feel free to forward this to him and have him fill out that form so we can start working together.”
https://wpml.org/forums/topic/fao-lauren-continuing-closed-thread-2/#post-1047484
===
Does that seem do-able?
Thanks, all the best
Greg
12/22/2016 at 10:39 am #404649Steven Zahm
Keymaster@ Greg
When they say create an XML file, I assume this is what they are talking about from their documentation:
https://wpml.org/documentation/support/language-configuration-files/
It sounds like you would need to create this XML file… I can’t create an XML file containing string I do not exist in my code. But I do not think this is a solution based on their docs.
You want to translate the actual contents of the job title field, correct? Only you have those strings because they exists only in your database. The field label itself can already be translated, if that is what you are asking about, as the plugin is completely localization ready. It has been for a long time now and is.
Now if we are talking about the field content, it does not appear that an XML file is the solution, that seems to be only required for the static strings in the plugin.
I’m unable to find any documentation which covers how to make field contents translatable for content which exists in custom tables. Everything seems to focus on post/page/widget/taxonomy content. If there was some type of filter or function I could apply to the string before being displayed, I would more than happily apply it but I simply can not find any documentation which covers exactly what you are asking to be done.
04/19/2017 at 5:54 am #420446Greg Kett
ParticipantHi Steven,
I spoke with the WPML developers. Their reply was:
=====
Hi Greg, he will need to work directly with our developers to get these answers. To do that, he should join our Go Global Program (https://wpml.org/documentation/theme-compatibility/go-global-program/).
Feel free to forward this to him and have him fill out that form so we can start working together. Once this form is filled out, our developers will get in touch and then they can answer his questions.
Please let me know if you need any further assistance and I will be happy to help.
=====
Does this sound like something you are able to do soon? Or are you already any closer to WPML compatibility?
It would be great to get your plugin working with WPML, it seems a real shame because I can see people (myself included) have been asking about it for 3 years, looking at support queries for “WPML” back to 2014…
Thanks and best wishes,
Greg
04/19/2017 at 6:14 am #420448Greg Kett
ParticipantHi Steven, further to previous, I followed some advice from a fellow poster, found here:
https://connections-pro.com/support/topic/compatible-with-wpml/#post-333557
I can confirm that this solution, whilst a not particularly elegant workaround, does indeed work great. However, as they have stated, it only works on the Bio & Info fields which are full tinymce text fields (possibly not the correct description)
It doesn’t work on any other field, ie job title. the shortcode gets rendered out as text.
If there were a way to just make the “TITLE” field in Connections compatible with shortcode entry, it would satisfactorily fix our challenge.
Any thoughts on this? Thanks and best wishes.
Greg
04/19/2017 at 9:35 am #420482Steven Zahm
Keymaster@ Greg
I’ve scoured the WPML docs several times… usually when this issue pops up again. I can not find anywhere in there docs where they document how to enable support for data stored in custom WordPress tables which contain user generated content. The closest I could find was how to accomplish it for text widgets which does not seems to cover this use case.
Unfortunately when there users ask this question of them they seem to only get the bog standard answer to have the dev join their program :/
Add shortcode support to the title field whole doable will not be of much actual use. The database field which saves this sata is limited to only 255 characters (roughly, it is actually 255 bytes, charact can be more than a byte).
To add shortcode support, I think, this would work…
Edit the
class.entry-output.php file. Change lines896and897from this:$org = $atts['show_org'] ? $this->getOrganization() : ''; $dept = $atts['show_dept'] ? $this->getDepartment() : '';to this:
$org = $atts['show_org'] ? do_shortcode( $this->getOrganization() ) : ''; $dept = $atts['show_dept'] ? do_shortcode( $this->getDepartment() ) : '';This is completely untested…
05/15/2018 at 6:25 pm #462576CHRISTOPHER CORRALES
GuestSo… nothing compatible on WPML yet?
-
AuthorPosts
- You must be logged in to reply to this topic.
