0.1.22 • Published 12 months ago

@quetzallabs/i18n v0.1.22

Weekly downloads
-
License
MIT
Repository
-
Last release
12 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

12 months ago

0.1.22

12 months ago

0.1.17

1 year ago

0.1.18

1 year ago

0.1.19

1 year ago

0.1.16

1 year ago

0.1.15

1 year ago

0.1.13

1 year ago

0.1.11

1 year ago

0.1.12

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.1.0-b

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago