I have created a content type (pdf_form), where I have added new field called ‘field_gender_languagetest’ with two options ‘male and ‘female’,
and I translated both options in German language by using translation tab option.
Now I am generating report of a data filed by users using that content type (pdf_form).
is there any way to get that translation programmatically?
I am trying $translate this but is not working
t('male', array(), array('langcode' => 'de'));
I am trying this but this query only returning the link
SELECT s.lid, t.translation, s.version FROM locales_source s LEFT JOIN locales_target t ON s.lid = t.lid AND t.language = 'de' WHERE s.context = 'field_gender_languagetest:node2pdf_language:label' AND s.textgroup = 'field'