Getting Started
Last updated
Was this helpful?
Last updated
Was this helpful?
To use this Tool within a React project, we first need to assure that the initial setup has already been made. So that it can work properly: install the next dependencies.
Before using any CLI commands, make sure to navigate to the React project folder and install the package .
There are 2 different options within Initialization:
Create a new App;
Clone the data from an existing one.
Using init, the CLI will prompt the auth service questions. And, once those were answered, we will then choose which languages will be added to the project.
Before using our Tool, the languages should be imported through importing i18n
folder created after running init. This should be in the following path: <appFolder>/src
. This import can be found in your index.js
or App.js
.
You will also need to import the method useTranslation
from react-i18next
.
After these two steps, all you have to do is create the constants t
and i18n
from the useTranslation
function
And use them in your project with the same syntax, from react-i18n-cloud
Check our test project in github.