The $message argument to watchdog() should NOT be enclosed within t(), so that it can be properly translated at display time.
Does this mean that $message will be translated by watchdog by default? [Similar to titles in menu hook]
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
As per the core documentation we should use the watchdog function without the
t() because it is translating when reading and outputing the log message.
dblog_watchdog() in "modules/dblog/dblog.module" and dblog_watchdog() is not translating anything before writing into the database BUT it is translating when reading and outputing the log message.
Might be if we store the translated string in the database(tokens replaced with real values), it will make it non translatable while displaying it to the user.So storing the string with tokens directly and replacing those at the time of display makes more sense as translation seems to be taken care of at presentation layer.
and I consider the same reason responsible for title in menu as they are kept untranslated as well.