At Localazy, we put a lot of effort into developing new, useful features to aid the localization journey of our users. Depending on their needs, they might have to choose a suitable feature to use.
Such example is whether to choose Connected Apps or Format Conversions to achieve translation transfer between apps.
π€ Why Connected Apps vs. Format Conversions?
Localazy's services are meant to help you in your quest to expand and to localize your software or digital text content. For that, we have developed multiple features explicitly built to make your life easier.
Two of those features are Connected Apps and Format Conversions. They're both created to help you reuse your already translated strings but differ in how and where you should use them.
Connected Apps and Format Conversions are advanced features and are available with the Professional plan and higher tiers. You can activate a 7-day trial of the Professional plan to try these and other advanced features before you commit.
See pricing for options
π Connected Apps
Connected Apps, at its core, enable you to connect different applications/projects and use each other's already translated strings they might have in common. Instead of translating identical strings repeatedly, Connected Apps will have them ready for you without any effort from your side.
Example
For demonstration purposes, let's create a project at Localazy. This project will be a simulation of the popular board game Battleship and will contain various strings allusive to the gameplay.
We now have to add English strings to the project. For this, I will create a JSON format file to add the strings. Note that it can be any file format supported by Localazy. I have chosen JSON randomly for demonstration purposes.
We will name our JSON file en.json, and it'll contain the following strings:
{
"welcome": "Welcome to Battleship",
"start_game": "Start Game",
"lang_choice": "Choose language",
"place": "Place your ships",
"ready": "Ready",
"score": "Score",
"miss": "The attack missed",
"hit": "The attack hit",
"sunk_carrier": "A Carrier has been sunk",
"sunk_battleship": "A Battleship has been sunk",
"sunk_cruiser": "A cruiser has been sunk",
"sunk_submarine": "A submarine has been sunk",
"sunk_destroyer": "A destroyer has been sunk",
"game_over": "Game over",
"won": "You won",
"lose": "You lost"
}
Now that our string file is ready, we can add it to our project at Localazy. We have two options:
- through the apps file management
- through our CLI, where you'll need to configure our
localazy.json
file with your specific needs characteristics.
We'll use the file management system for now. The CLI approach will be exemplified during the Format Conversions topic.
The File management makes it so easy and fast to start using Localazy's services right away.To add a file with strings, simply click on the β in the top right corner and Β drag and drop the file you want to upload it.
Let's translate the strings to Portuguese and Spanish now.
We now have an app that contains multiple different languages, which's pretty cool, but now I have another classic game I want to port into the digital world, that'll be Tic Tac Toe.
Once again, I'll create a JSON format file and add the strings relevant to the game.
{
"welcome": "Welcome to Tic Tac Toe",
"start_game": "Start Game",
"lang_choice": "Choose language",
"ready": "Ready",
"score": "Score",
"game_over": "Game over",
"won": "You won",
"lose": "You lost",
"share": "Share score"
}
Now, all we have to do is repeat the process of creating the app on Localazy and add the strings, just like before.
As you can see, both files have almost the same strings, with a few distinct differences. What are we going to do now? Are we going to translate them all again? No, we don't need to because we can use Connected Apps for this specific type of situation. We will use the already translated strings and use them where string repetition occurs.
The difference now from Battleship is that instead of jumping right away to the translation, we will connect it to Tic Tac Toe.
Remember: To see Connected Apps in action, you have to activate the Professional tier trial for your account!
To do this, we need to head to App settings and click on the Connected Apps tab.
After linking the two apps together, if we head to Tic Tac Toe's Translations, this should be the result.
With our Battleship and Tic Tac Toe apps connected, we are saving time and money as we are not repeating the translation process. There are only a few strings, but your mental sanity will gradually diminish without a feature like Connected Apps when you have to manage hundreds or thousands of them.
In this case, we connected two apps, but the connection chain can grow by linking more apps. If that is your wish, that will enable you to use even more mutual strings. The more mutual strings the apps have in common, the more they benefit from each other as they autocomplete each other.
Learn more about Connected Apps in the documentation.
π Format Conversions
In this scenario, let's suppose that you've developed an app for a specific platform, you've followed the l10n process, and externalized the strings. This allows you to add languages, adapt to the cultural context, and fulfill other requirements of a specific target market.
So far, so good, but what if you want to expand yourself to other platforms or integrate new tools and use different localizable file formats?
We developed our Format Conversions feature precisely to convert the given format to your specific needs, enabling you to expand your project effortlessly.
To learn more about Format Conversions and to see the complete list of supported formats, click here.
Remember: To see Format Conversions in action, you have to activate the Professional tier trial for your account!
Example
To illustrate the feature, we will use our Battleship strings. I want to expand the project to Android, but the format they are stored in right now is JSON, so I have to convert it. To do so, we will need to install Localazy's CLI.
For this example, we'll create a directory structure with the following layout:
.
βββ locales
β βββ en.yml
βββ converted
βββ localazy.exe
βββ localazy.json
The locales
folder is where we will keep the file we want to convert, and in the converted
folder, we will store the converted files. All of this will have to be configured in our localazy.json
file.
The localazy.exe file is the Localazy CLI; if you use a different OS, you might not have it downloaded and stored here.
The localazy.json
will have the following configuration:
{
"writeKey": "your-write-key",
"readKey": "your-read-key",
"upload": {
"type": "json",
"files": "/locales/en.json"
},
"conversion": {
"actions":
{
"type": "android",
"output": "converted/${lang}.xml"
}
}
}
If you're familiar with our CLI, you know that we use writeKey
and readKey
to upload and download the files. For you to have these keys assigned, you can get them from your project's App settings section in the Access keys tab.
Now that our localazy.json
file is configured, let's place our JSON strings file on the locales
folder and open the terminal in the folder's root.
We can now execute localazy upload
and right after, Β localazy download
, with these two commands, if we had never uploaded the strings or translated them, we would have our directory changed to this:
.
βββ locales
β βββ en.json
βββ converted
β βββ en.xml
βββ localazy.exe
βββ localazy.json
Because we already have our strings uploaded and translated into an extra two languages, our directory in this particular situation looks like this:
βββ locales
β βββ en.json
βββ converted
β βββ en.xml
β βββ es.xml
β βββ pt.xml
βββ localazy.exe
βββ localazy.json
You'll be able to convert all your already translated string files automatically.
The English Android strings file will look like this:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="game_over">"Game over"</string>
<string name="hit">"The attack hit"</string>
<string name="lang_choice">"Choose language"</string>
<string name="lose">"You lost"</string>
<string name="miss">"The attack missed"</string>
<string name="place">"Place your ships"</string>
<string name="ready">"Ready"</string>
<string name="score">"Score"</string>
<string name="start_game">"Start Game"</string>
<string name="sunk_battleship">"A Battleship has been sunk"</string>
<string name="sunk_carrier">"A Carrier has been sunk"</string>
<string name="sunk_cruiser">"A cruiser has been sunk"</string>
<string name="sunk_destroyer">"A destroyer has been sunk"</string>
<string name="sunk_submarine">"A submarine has been sunk"</string>
<string name="welcome">"Welcome to Battleship"</string>
<string name="won">"You won"</string>
</resources>
βοΈ Conclusion
After the given examples, we can conclude that different problems require different solutions.
Connected Apps are ideal for developers with multiple projects or forks that have strings in common.
Format Conversions is the best feature for people whose project is one multiplatform app. Instead of rewriting the string files every time they want to expand their project, they can instead use our Format Conversions feature to speed up the process.
Connected Apps and Format Conversions are available for all users with the Professional tier and up.
This is a companion discussion topic for the original entry at https://localazy.com/blog/connected-apps-vs-format-conversions-localazy