Translating an App to multiple languages (localization) is tricky part of many applications. Tolgee is simplifying the localization process and saves developer's time π¨βπ»π©π»βπ» by removing repetitive tasks π β. Saving time? That's what I want. Show me!
What is Tolgeeβ
Tolgee is open-source i18n tool combining localization platform and SDKs to provide simple way to translate the web applications for both developers and translators. π¨βπ»π©π»βπ»π§πΌπ©π»βπ»π§πΌ Tolgee is not just another localization platform offering integrations that only syncs local data with the backend. Instead, Tolgee is truly integrated into your app via SDKs. So no more looking for keys in your source code, no more editing localization files, and no more data exporting for translators.
In context translating πβ
As a developer of localized application, you probably have to modify localization data every time you need to change a text. So you have to open the file, add or find the key to modify, save it and check whether everything was changed correctly in the app. With Tolgee you can just ALT + click
the actual translated text in your app and π₯boomπ₯ translation dialog appears and you are able to translate it right away. You can even translate in-context on production.
Automatic Screenshot Generation πΈβ
Another tricky part of localization is providing context π to translators. Only exporting the keys and translations in source language is not always enough. Tolgee enables you to take and upload screenshot directly in the in-context translation dialog. So no more manual taking and uploading screenshots.π
Localization platform included β β
Tolgee is also localization platform, where you can manage all your localization strings π. So you can provide access to translators and they can translate the texts there. If you uploaded screenshots before, they know the context of the translations perfectly so they can produce perfect results. You can watch a short tour in the Tolgee platform on our Youtube Channel.
Isn't that hard to integrate? No it's not!β
To get started, you can simply follow the integration guides provided in the Tolgee localization platform. Which is the simplest way to get started.
Login to Tolgee Cloud or use your self hosted Tolgee instance.
Create a new project by clicking
Add
button in the top right. And filling the project name.Optionally, you can add multiple languages to translate your React.js app into.
Select
Integrate
from side menu, choose React and generate an API key with all scopes checked.Success! π Now you just have to follow the integration guide.
Let's integrate it into React.js Appβ
Generate brand new React App and open it your favorite editor
npx create-react-app tolgee-hello-world
Install Tolgee packages β¬οΈ
npm install @tolgee/react @tolgee/ui --save
Add Tolgee properties to you development
.env
fileenv.development.local
by copying it from the integration guideREACT_APP_TOLGEE_API_URL=https://app.tolgee.io
REACT_APP_TOLGEE_API_KEY=<your API key>Wrap your App component in
index.js
withTolgeeProvider
component. Again, you can copy it from the integration guide.Go to
App.js
and replace all the crap with simple "Hello world!" message.import './App.css';
function App() {
return (
<div className="App">
<h1>Hello world!</h1>
</div>
);
}
export default App;Wrap the "Hello world!" with
<T>
component and add keyName prop.import './App.css';
import { T } from '@tolgee/react';
function App() {
return (
<div className="App">
<h1>
<T keyName="hello_world">Hello world!</T>
</h1>
</div>
);
}
export default App;Let's run the App in the browser and see the magic! πͺ Hold your ALT key and move your mouse over the text. It should be highlighted. When you click it, dialog opens and you're able to edit the text βοΈ or generate screenshots. π·
After you hit the update button, your
Hello World!
text will be immediately changed to the new value!
Congratulations! You're done! πππβ
You can find the resulting code in this GitHub repo, but you have to add your .env.development.local
file.
Now you are able to translate your React.js applications with Tolgee. To learn more about Tolgee or to find out how to translate more complicated cases, visit our docs or integrations to other frameworks.
TL;DRβ
Tolgee for React provides a simple API to create a multi-lingual React application. With Tolgee i18n library for React, you can enjoy all Tolgee i18n features.
Tolgee is open-source tool simplifying the process of web based application. It has these features:
- It's open-source and free localization (i18n) tool
- You can translate in the context of your React.js app
- You can generate screenshots automatically
- Open-source localization platform included
- Localize react.js app with Tolgee fast and save time!
πππ If you like what we do, please star our GitHub projects. πππ
- Tolgee Platform β Tolgee JavaScript libraries monorepo
- Tolgee JS β Developer & translator friendly web-based localization platform