Hi
I am using toolset + elementor pro/astra + wpml
My issue is my front end forms are correctly translated but it is not the case for the edit forms : most of them (but not all !) are not translated whereas I input the translations in wpml...
I already contacted WPML support team but they do not seem to find the solution. Maybe you have an idea. I can give you an access to the site so that you can see. I am desperate as I spent several hours already to understand the issue.
I, also, wonder if you activate auto-register in WPML->String translation and visit your forms in the frontend, do they get translated?
Finally, allow me temporary access to your admin area and provide an example of a form and where it is shown in the frontend to check it further. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
I still need to discuss the case (A) before drawing conclusions. According to WPML settings for custom post type mytodolist, the custom post type is not translatable. You can check it in WPML->Settings->Post Types Translation which will be "WPML->Paramètres->Traduction des types de publication" in French.
According to that, it is expected that the edit link redirects to the original post, which is in French.
I guess, I need to know what results would you like to get at the end to better advise you.
For the case (B), I can see that the form translation are complete in WPML->String Translation, but the form strings are still in English while on the French page. For this issue, I will need to access the database and check what language is assigned to each elements involved in this view(content template, and the form). I might need to take a copy of your website for easier debugging on my local computer, please let me know if it is ok for you?
The custom post type "Assurance" is also not configured for translation in WPML->Settings, I wonder if you would like to translate it? And what custom fields you want to be translated?
If I knew more about what you intend to build, I might give better advice.
I might also need to split this ticket into two to respect our support rules of one issue per ticket. Let me know your answers for my questions and we'll continue from that.
For case A
I need to see the view, the front end form and the edit form in the same language. This means I need a french version and an english version of these elements
FYI I now set all the CPT as translatable in wpml/settings
For case B
yes you can duplicate the site and test on your own servers.
And same as case A I want my views/frontend forms/edit forms to be available in French or in English.
I think it is ok for the views and the front end forms, but not for the edit forms.
Thank you! I took a copy of your website and I'll analyze it regarding the case (B).
But, I still prefer to discuss your use case further, just to be sure. Please note that WPML is a bit strict on how you translate your content. The best practice is to create the content on the primary language then translate it through Translation Management(Translation editors, classic and advanced).
You will also need to configure the custom fields for your post types. For example, for "mytodolist" custom post type, you may want to translate only the "Intitulé" and copy the deadline and the validation to the translated "mytodolist". This also can be configured in WPML->Settings->Custom Fields Translation, or on a post screen(Multilingual Content Setup section), or using a custom XML configuration. Check the following articles:
- https://wpml.org/documentation/getting-started-guide/translating-custom-fields/
- https://wpml.org/documentation/support/language-configuration-files/#custom-fields
As now, you have defined "mytodolist" to be translated, the view that displays them will only show the posts on the current language. To make them available to the other language, you will have to create a translation automatically. This will require custom code to be implemented. WPML API only provides a way to create duplicates. I understood that you want to be able to edit "mytodolist" posts in both languages, right? In this case the duplication mode of WPML is not of help, as it will always take the edit form to the original post, in the language of the original post.
For that, we will create a duplicate to the other language, then we will mark this duplicate as translation instead of duplicate.
Check this reply here for a custom code that will implement that: https://toolset.com/forums/topic/duplicating-post-to-all-other-secondary-languages-with-cred-form-and-wpml/#post-1144834
Please note, that this is relevant only for the "Create post" forms. Once, a "mytodolist" is created, it has the current language assigned. The code, in that reply, will ensure that each new post, has a translation on the other language with the same information. This will allow us to edit any translation with a Toolset form.
Regarding case (B), I was not able to take a Duplicator copy(hidden link) maybe because of Wordfence or an execution limit on your website. But, as all the information above also applies to "Assurance" custom post type and forms, let's first see how you would implement my recommendations and we can continue from there. Sounds good?