Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skeleton for Translation #368

Open
IsmailM opened this issue Jun 3, 2021 · 0 comments
Open

Skeleton for Translation #368

IsmailM opened this issue Jun 3, 2021 · 0 comments

Comments

@IsmailM
Copy link
Member

IsmailM commented Jun 3, 2021

Further to #358 / #265

This is pretty easy:

  1. First update config:
i18n.init({
  react: {
     wait: true,
     useSuspense: false,
  }
})
  1. Next use ready from the useTranslation() hook:
  const { t, ready } = useTranslation();

  /// render skeleton as long as ready === false

See https://react.i18next.com/latest/usetranslation-hook#not-using-suspense
https://stackoverflow.com/questions/58871043/react-i18next-suspense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant