0.0.23 • Published 8 months ago

@grams-dev/i18n v0.0.23

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months 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

8 months ago

0.0.22

8 months ago

0.0.21

8 months ago

0.0.20

8 months ago

0.0.19

8 months ago

0.0.18

8 months ago

0.0.17

8 months ago

0.0.16

8 months ago

0.0.15

8 months ago

0.0.14

8 months ago

0.0.13

8 months ago

0.0.12

8 months ago

0.0.11

8 months ago

0.0.10

9 months ago

0.0.9

9 months ago

0.0.8

9 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago