Be sure to set the right locale and language before doing so. Remember that the shell tasks will not perform the logic that is handled in locations like AppController::beforeFilter()
, so if that is the location that you normally set your language/locale, it won't be set in the shell task.
Also, if you rely on 'auto' detecting the locale from the browser accept-language, this will obviously not work :)
Also you need to have the locales you wish to use installed on the server side so based on the server you're using you will have to make the appropriate checks to verify that indeed this locale(s) is(are) present on your server/machine that is running the Shell(s).
The regular function __()
should also work inside the Shell