Start by installing Languine.
Then, run the following command to initialize Languine.
npx languine@latest init
Follow the steps to set up your project.
Now you are ready to translate your code.
Start by adding a key to your source file, for example if you choose to use en.json
as your source file, add a key to it.
{ "welcome": "Welcome to our application!", "user": { "greeting": "Hi, {{name}}!", "profile": { "title": "Your profile", "edit": "Edit profile" } }, "notifications": { "messages": "You have {{count}} new message(s).", "empty": "No new notifications." } }
Run the following command to translate your content:
npx languine@latest translate
languine.lock
file to track translation statesThe lock file helps Languine identify which translations need updates when your source content changes. Make sure to commit this file to your repository.
Now that you have Languine set up, you can:
languine.json
fileCheck out our other guides to learn more about Languine's advanced features.