0.0.23 • Published 1 year ago

@grams-dev/i18n v0.0.23

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

@grams-dev/i18n

npm version npm downloads License

A localization and internationalization library for Grams applications.

Overview

The @grams-dev/i18n library provides a simple and efficient way to manage translations and internationalization in Grams applications. It stores translation strings in JSON files and exports these translations to other libraries or frameworks.

Installation

Install the library using npm:

npm install "@grams-dev/i18n" --save

Usage

1. Import the i18n Object

In your index.html, import the i18n object from @grams-dev/i18n to access the translation strings

import '@grams-dev/i18n';

2. Using the hook

Using the hook in functional components is one of the options you have. The t function is the main function in i18next to translate content.

import React from 'react';

// the hook
import { useTranslation } from 'react-i18next';

function MyComponent () {
  const { t, i18n } = useTranslation();
  return <h1>{t('Welcome to React')}</h1>
}

Learn more about the hook useTranslation.

Contributing

We welcome contributions from the community to improve and expand the functionality of the @grams-dev/i18n library. If you find any issues or have suggestions, please create a pull request or open an issue on our GitHub repository.

License

This library is open-source and available under the Apache-2.0 License. Feel free to use, modify, and distribute it as needed.

0.0.23

1 year ago

0.0.22

1 year ago

0.0.21

1 year ago

0.0.20

1 year ago

0.0.19

1 year ago

0.0.18

1 year ago

0.0.17

1 year ago

0.0.16

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago