Never Push to Master

    @hi18n/react
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.5 • Public • Published

    Core library for hi18n

    See hi18n's README for general information.

    LocaleProvider

    Configures the locale context.

    <LocaleProvider locale="en">
      <App />
    </LocaleProvider>

    useI18n

    Retrieves a translation helper from a book and the locale from the context.

    const { t } = useI18n(book);

    LocaleContext

    It provides an advanced control over the locale context.

    Translate

    Translates the message, possible interleaved with React elements.

    <Translate book={book} id="example/greeting">
      <a key="link" href="" />
    </Translate>

    Install

    npm i @hi18n/react

    DownloadsWeekly Downloads

    1,022

    Version

    0.1.5

    License

    MIT

    Unpacked Size

    72.5 kB

    Total Files

    10

    Last publish

    Collaborators

    • qnighy