fixing a few bugs with i18n and the current language not always being set properly