I use Drupal 7.9 with Views module (if the latter is important). I've created a small module for my site that changes transliteration of Japanese words in articles from Latin to Cyrillics and vice versa (yes, I need such a thing). User sees a form with radio button set, chooses transliteration, his choice goes to $_COOKIE and then I change transliteration in article summary and body based on user's choice. Or better to say I'm trying to change it but it doesn't work. The code goes like this:
function mymodule_preprocess_node(&$variables) {
/* Suppose we have a summary containing only one word 'Yamamoto' that has to be changed to 'Ямамото' */
$variables['node']->body['und'][0]['summary'] = 'Ямамото';
}
After this code is executed, the changed variable has the correct value of 'Ямамото'. But in the main page for some reason I see the unchanged 'Yamamoto'. What am I doing wrong? Do I change the wrong field? Do I mess up working with parameters passed by reference? Do I use the wrong hook?