On Fri, Jun 13, 2008 at 2:18 PM, Juan Rodriguez <juan.fco.rodriguez@gmail.com> wrote:
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. I wonder why the previous line is not written this way: ... drupal_set_title(t('Submit @name', array('@name' => t($types[$type]->name)))); ...
Because t() translates static text (coming from source code), not user entered text (such as the node 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() ?
So that would make all user names, numbers, etc end up in the translation table, right?. Such as t('@number of new posts', array('@number' => $new_post_count) would always t() the $new_post_count, and you would get 1, 2, 3, 4, up until infinity in your translation table. I don't think this is what you want. Gabor