i use customfiel php code inside one of my views to translate a string since 2.x of views is bad at localization. i use the following php code:
echo t('Watch Video');
but the string does not appear in the “translate interface” section.
thanks for your help.
lukas
The localisation database is built by scanning the source code, looking for instances of the
t()function (andDrupal.t()in Javascript).If the code in question has been entered into a text box in the Drupal admin area, then it isn’t in the source code, so it won’t be picked up by the localisation process.
For this reason (and others), you should put as little code as possible into the admin text boxes. There is usually an alternative way to achieve the same thing, but even if there isn’t, you should reduce the code to a minimum — best practice would be to have nothing there except a single line function call: have it call a function, and write the function code in your module or theme. That way it will be parsed when you run the localisation.