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.
Tagged: Exception
This topic contains 18 replies, has 2 voices.
Last updated by legaltreeB 1 year, 9 months ago.
Assisted by: Osama Mersal.
Author | Posts |
---|---|
August 28, 2023 at 6:30 am #14297269 | |
Osama Mersal WPML Supporter since 02/2020
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+03:00) |
Hi, Thanks for your patience. I'm afraid that the only way to translate these fields is using String Translation. (https://wpml.org/documentation/getting-started-guide/string-translation/translating-user-meta-information-with-wpml/#translating-custom-user-fields) Users can't be treated like posts due to WordPress regulations, as explained before, and how they are saved in the database. Kindly let me know if you need further assistance regarding this issue. Best regards, |
August 28, 2023 at 7:23 am #14297615 | |
legaltreeB |
Hello Osama! Aaaw, that's a shame. That concludes our conversation then. In the meantime I have worked out how to make it work. Luckily, it has nothing to do with the way the User Fields are stored, I'm talking regular ACF-Fields. They stay a regular ACF Field Group, whatever information you store in them, and wherever you display that information. I do wonder what WordPress regulations your colleagues are referring to regarding User Profile fields (it sounds like one of those repeated mantras tbh). What I found out is that even if these ACF Fields were regarded as native WP User Profile Fields (which they aren't), it wouldn't violate WordPress regulations! Wordpress regulations say that translating user profile information is possible, but it's important to handle translations carefully. (I suppose WPML is handling it carefully). So it seems to me that WPML is ignoring some unexploited territory. I'm sure many users would like to enrich User Profiles without much ado. Well, I'm enjoying my solution already. It requires just one extra click now so it's very workable for my client. In fact it could be an option in WPML itself - but if one click less is the difference between violating WordPress regulations or not, you can't risk it. Before you know it, you have the WordPress-police knocking on your door! 😉 Anyway thanks for your excellent help, really outstanding. kr |
August 28, 2023 at 7:28 am #14297659 | |
Osama Mersal WPML Supporter since 02/2020
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+03:00) |
Hi Anton, It's great to hear that your workaround is doing the trick. 🙂 As for translating them using WPML, the only option currently is to translate them using String Translation. Maybe in the future, we add another translation approach. Have a great day! Best regards, |
August 31, 2023 at 2:56 pm #14322013 | |
legaltreeB |
Due to the outcome of this convo, in which restrictions of WPML were affirmed, I'm now in the process of converting the User Type Field Group to a CPT. So my issue is not really 'resolved', but I'll work around it. |