added missing code from old repository; added support for globalize2 extension