Skip Navigation

[Resolved] types_render_field 'output'=>'html' not translated

This support ticket is created 6 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 7 replies, has 2 voices.

Last updated by Shane 6 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#1184074

I am trying to: Use the custom field name as a translatable label for the field (WPML installed and custom field name is translated in the string translation) in my PHP code but the translation is not working when I use 'output'=>'html' but only when I use 'output'=>'raw'. Is this a know bug?

<?php echo types_render_field("object-reference-code", array('output'=>'html', 'show_name'=>'true')); ?>

#1184227

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Thank you for contacting our support forum.

Before I can investigate this for you, could you let me know which field type you are using so that I can check on this for you ?

Thanks,
Shane

#1184236

I'm using the textfield but I've tried with other field types as well and when the output is set to html the field name is not translated.

#1184251

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Yes I checked on this for you and what you need to do is to translate every instance of the Field Name in string translations and it should show up translated.

Please let me know if this helps.
Thanks,
Shane

#1184294

Thanks Shane but I have already done that. That's why I'm saying that when I use 'output'=>'raw' I can see the translated string but when I use 'output'=>'html' the field name remains in the original language.

#1184303

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

This is not what happens on my end in my testing.

Once I replaced all the strings in String Translations that references the field name it works for me with the HTML output.

Would it be possible for me to gain access to check on this for you ?

The private fields have been enabled.

Thanks,
Shane

#1184876

Unfortunately I'm doing my tests locally. I will try to move it to the live site but until then can you think of what else I should check? If you tell me that 'output'=>'html' should also show the translated field name as 'output'=>'raw' does there has to me something wrong with my settings. Default language is Greek and additional language is English but the Toolset custom fields are created with english field names and then translated to Greek as the WPML instructions point.

#1185041

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

I dont believe that it should matter much, however i'm not an expert on WPML to say whether or not the default language will affect such a setting. However once the correct language is being provided it should work as intended.

All I did in string translations is to translate every instance of the field name that I could find.

I'll enable the private fields for your next response, so please let me know as soon as you're able to provide the credentials.

Thanks,
Shane