2008/6/13 Juan Rodriguez <juan.fco.rodriguez@gmail.com>:
Hello,
I am trying to translate what comes from the following piece of code inside node.module:node_add() .... drupal_set_title(t('Submit @name', array('@name' => $types[$type]->name))); .... Using localization I can translate "Submit @name" to "Enviar @name". The problem is that the node type name is written in english and I can not change that name without breaking a lot of custom pages.
If you are running Drupal 5+, go to admin/content/types and change the node type 'nice name' there.
I wonder why the previous line is not written this way: ... drupal_set_title(t('Submit @name', array('@name' => t($types[$type]->name)))); ... Another option would be to modify function t(), to automatically pass all arguments through t(). Do you see any problem with modifiying t() ?