Refactor i18n

Refactor i18n code to support HabitRPG/habitrpg-shared#168

**Do not merge yet.**