Get started translating your product in minutes.
npm install --save @quetzallabs/i18n
.env
file so you can add your Quetzal API Keyquetzal.config.json
file for you to editi18n.ts
) in your project root which detect’s the user’s locale for use with next-intl
package.json
so that we can get all your strings before a build and either get the existing translations or translate new strings.NextIntlClientProvider
or IntlProvider
.
For Next projects, you also must include the createNextIntlPlugin
in your next config file. This process is documented by next-intl.
.env
file with your QUETZAL_API_KEY
found in the dashboard from the previous step. (If you used the setup script, this will already be added for you!)quetzal.config.json
specifying which folders to scrape for t
-wrapped strings.next.config.js
or next.config.mjs
to add the next-intl
plugin to your project:next.config.js
next.config.mjs
next-intl
provider to your layout.tsx
, like so:t
function from either the hook or the awaitable function like so:
Async/Server Components
t
function here.
npm run prebuild
. This will scrape all of the strings you wrapped in the previous step and send them to us for translation. This will also run when you run npm run build
. You can see the status of these translations on the Quetzal dashboard. For a few strings, it should only take a second. For many hundreds or thousands of strings, it may take a few minutes.
And now you’re done! Strings will be grabbed and translated when production builds are made going forward.