1.1.2 • Published 2 years ago

i18n-nextjs v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Get started

🐇 Quick start

Install i18n-nextjs with via your package manager:

npm install i18n-nextjs

Then import the useTranslation hook:

import { useTranslation } from "i18n-nextjs";

export const MyComponent = () => {
    const t = useTranslation();
    
    return (
        <span>{t("key.to.value", {name: "My Name"})}</span>
    )
}

All locales are stored in the locales folder in the public folder of your project. For every locale you need to create a file with the name of the locale. (e.g. en.json) Structure of the locale file:

{
    "key": {
        "to": {
            "value": "Hello, {{name}}!"
        }
    }
}

👩🏻‍⚖️ License

  • i18n-nextjs is MIT licensed.
1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago