[development] Translating database fields

Earl Miles merlin at logrus.com
Wed Sep 23 17:14:06 UTC 2009


Peter Droogmans wrote:
> You can do the opposite, define a tt function if the module doesn't exist, it keeps your code cleaner

You need to do it this way:

if (!module_exists('i18nstrings') && !function_exists('tt')) {
   function tt($string) {
     return $string;
   }
}

That way 2 modules trying to define tt() won't run over each other.


More information about the development mailing list