Add gt-next
Let's get your project ready for translation!
Introduction
Congratulations on setting up your NextJS project! Now, let's get it ready for translation using gt-next
.
Right now your project is a normal, non-internationalized project that can only be read in one language. However, before we can start translating, we need to add the library to your project and set up your environment.
Install gt-next
Next, let's add the gt-next
library to your project. You can do this by running the following command:
Set up your environment
Create a .env
file in the root of your project and add your api key and project id.
If you have not set up your project yet, just log in to your General Translation account.
Open the DEV API Keys page and create a new DEV API key.
Finally, copy the DEV API key and project ID and paste them into your .env
file.
Conclusion
By now, everything should be ready and set up to start translating.
All we have to do now is add the <T>
component to our project and start translating!