Add gettext Support

- Using gettext Smarty plugin from:
https://code.google.com/p/smarty-gettext/
- Working on template system
- Bugfix database exception during connection