0.1.22 • Published 10 months ago

@quetzallabs/i18n v0.1.22

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

Welcome to Quetzal!

This package contains all the utilities you need to get started using Quetzal.

To install: npm install --save @quetzallabs/i18n

Once installed, run npx quetzal-setup

Read more about how to use this package at: https://quetzal.mintlify.app/getting-started

This package relies on the next-intl provider to put translations into your app: https://www.npmjs.com/package/next-intl

Be sure to include this provider within your next application, and to put the next-intl plugin in your next config file

The t function

Text in your application is translated by wrapping it in a t function. This function is built on the next-intl t function: https://next-intl-docs.vercel.app/docs/usage/messages

For components:

import { useI18n } from "@quetzallabs/i18n"; const { t } = useI18n();

For server-side:

import { getI18nUtils } from "@quetzallabs/i18n"; const { t } = await getI18nUtils();

Example usage:

t("This text will be translated to multiple locales by Quetzal")

Once your application has some of its text in t functions, you can run npx quetzal-process-translations. This command will send new text to be translated and fetch text that has been translated already.

This command should be executed before every build to ensure up-to-date translations are included.

0.1.21

10 months ago

0.1.22

10 months ago

0.1.17

10 months ago

0.1.18

10 months ago

0.1.19

10 months ago

0.1.16

10 months ago

0.1.15

11 months ago

0.1.13

11 months ago

0.1.11

11 months ago

0.1.12

11 months ago

0.1.10

11 months ago

0.1.9

11 months ago

0.1.8

11 months ago

0.1.7

11 months ago

0.1.6

11 months ago

0.1.5

11 months ago

0.1.4

11 months ago

0.1.3

11 months ago

0.1.2

11 months ago

0.1.1

11 months ago

0.1.0

11 months ago

0.1.0-b

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago