Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hello,
<php
return $node->field_xxx[$node->language][0]['value'];
?>
returns a "value" like "2" or "4" because the field is built like that :
1|one
2|two
3|three
4|four
...
In fact, I get the "key", not the real "value" (one, two, three, four...)
When using the common token [node:field_xxx], that's better : I get the value "two" or "four" but always in source language.
BUT not the translation I made of each item, even if I'm into the translated edit page.
Comments
Comment #1
gaurav.kapoor CreditAttribution: gaurav.kapoor at OpenSense Labs for DrupalFit commented