-- | Execute some actions with specified language.
withLanguage :: Monad m => LanguageId -> LocalizeT m a -> LocalizeT m a
withLanguage lang actions = do
  oldLang <- gets lsLanguage
  setLanguage lang
  result <- actions
  setLanguage oldLang
  return result

-- | Set current context.
withLanguage :: Monad m => LanguageId -> LocalizeT m a -> LocalizeT m a
withLanguage lang actions = do
  oldLang <- gets lsLanguage
  setLanguage lang
  result <- actions
  setLanguage oldLang
  return result

-- | Set current context.
withLanguage lang actions = do
  oldLang <- gets lsLanguage
  setLanguage lang
  result <- actions
  setLanguage oldLang
  return result

-- | Set current context.