0.1.5-rc6 • Published 1 year ago

next-locale-database v0.1.5-rc6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Next locale database

Installation

Get the latest version by NPM:

$ npm install next-locale-database

Get the latest version by yarn:

$ yarn add next-locale-database

Usage

Use hook

Import next-locale-database:

import useLocale from "next-locale-database";

And use hook in your function component:

  const {getLang} =  useLocale();

Get locale string in your component

  <Component>
    { getLang('{"en": "Example", "vi", "Ví dụ"}') }
  </Component>

Get locale string in your component with force a language

  <Component>
    { getLang('{"en": "Example", "vi", "Ví dụ"}', 'vi') } // Return: Ví dụ
  </Component>

License

MIT license. © kpwzto

0.1.5-rc6

1 year ago

0.1.5-rc5

1 year ago

0.1.5-rc4

2 years ago

0.1.5-rc3

2 years ago

0.1.5-rc2

2 years ago

0.1.5-rc1

2 years ago

0.1.5

2 years ago

0.1.4

3 years ago

0.1.4-rc1

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago