Skip Navigation

[Gelöst] Using qTranslate with Types

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created vor 11 Jahre, 7 Monate. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 -
- - - - - - -

Supporter timezone: Europe/Madrid (GMT+01:00)

Dieses Thema enthält 6 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Joff vor 11 Jahre, 7 Monate.

Assistiert von: Caridad.


I'm trying to add multi-lingual support to my Types through qTranslate but I'm having trouble with implementing the shortcode in a View. I've tried adding the [:en]-style shortcode to both the view (surrounding the Types field shortcode) and within the Types field itself.

The closest source of info I've found was but there's no mention of how the solution was found.


Dear Joff,

There was no solution mentioned in that thread, just the fact that WYSIWYG fields wont work with qtranslate. Can you manage without them or do you need them?



Hi Caridad, I really do need them in this instance I'm afraid. The fields I'm using are all single line so I had hoped that qTranslate would work one way or another, either with the qTranslate shortcode within the field itself or as part of the View template but neither approach seem to work.


Dear Jeff,

QTranslate will only modify the title and the content for you to input the different languages. You can have multilingual fields by using QTranslate special notation, for single line fields it has to work:

<!--:es-->Spanish Name<!--:--><!--:en-->English Name<!--:-->

Later, to print the value of this field in a template file you have to use the __() so that QTranslate gets a chance to filter it:

<?php echo __(types_render_field('buildingname', array())); ?>

Please let me know if there is anything else that I can assist you with.



Hi Caridad, thanks for that but is there a way to print the value of the fields within the View/Content Template?


Dear Joff,

Yes, with the types shortcode:

[types field="buildingname"][/types]

To run all these strings through the QTranslate filter you might need to add some code to functions.php in your theme:

add_filter('wpcf_fields_value_display', '__');

Please let me know if there is anything else that I can assist you with.



Hi Caridad, many thanks the filter has resolved my issue.

For reference if anyone else is trying to achieve the same, use the filter above with the Types special notation, e.g.

<!--:es-->Spanish Name<!--:--><!--:en-->English Name<!--:-->

Das Forum „Types Community Support“ ist für neue Themen und Antworten geschlossen.

Dieses Ticket ist jetzt geschlossen. Wenn Sie ein Toolset Kunde sind und Hilfe benötigen, eröffnen Sie bitte ein neues Support-Ticket.