I tried the JS method, which worked fine in our primary language en, however when I sent the Post Forms for translation, the new strings didn't appear for translation into German (de).
Is there any way round this? Does the gettext method support WPML translation, and if so, how?
On a similar note, I'm also having trouble getting the placeholder text for a normal post title field translated via a Post Form. I tried all sorts of combinations with single and double quotes and [cred_i18n] tags but the editor can't seem to interpret it well.
Sorry I may have confused you with the two related placeholder text translation issues:
1) Placeholder text one is the "Enter Address" for the Google Maps address entry field in a Post Form.
2) Placeholder text two is the translation of the standard option placeholder, as in [cred_field field='post_title' placeholder='THIS IS THE TEXT WE NEED TRANSLATED' ....
Perhaps we need to split this ticket into two issues so they can be handled separately?
For the Google Maps address field issue, there may be no other solution than the proposed gettext.
The JS solution worked great in original language, but it not translatable, as Beda suggested, at least for me.
Beda mentioned that the gettext method is not good for performance. If it possible to solve either issue without adding custom code that would be best. Are you suggesting to use the gettext to solve both issues?
I suspect that the cred_field placeholder could be solved with the right syntax. My problem was placing a [cred_i18n] shortcode in the middle of the [cred_field] shortcode for the
placeholder='my custom text'
I think the PHP just has a problem misinterpreting the multiple single quotes, because placeholder= requires single quotes, but then so does the name argument of cred_i18n. I tried all sorts of combinations like putting the cred_i18n in double quotes etc, but without any luck. Maybe escape characters or similar could help?
Can you please share the link of the page where I can see the form where you added the address field and let me review what could be the best solution.
I'm sorry, I don't fully understand what you expect me to do - add this snippet to custom code and replace something where the comments are in lines 21 and 23?
Which issue is this aimed at fixing?
Unfortunately I have to go to hospital for 2-3 days so I may not be able to respond until Monday, but if I'm up and well, I can try to reply sooner.