The File Manager is a powerful tool to manage your files on WebTranslateIt. It supports projects made of several files (with no limit) and maps files to locales.
In order to understand how it works, we need to learn some vocabulary. Let’s consider a software in English. We want to translate it to two other languages: French and Italian.
- We call an English language file master language file. Any change made to the master is synched to the target files. For instance, if you add a segment to the English file, it will automatically be added to all the target files.
- We call the French and Italian language files target language files.
You start by uploading your master language files. If you have languages set up, WebTranslateIt will create the target language files for you. By default, target language files are hidden, but you can toggle them by clicking on the arrow.
If you already have translated (even partially) your language files, you can upload your translations by clicking “update” next to each target file. Your translations will then be imported to database and will be displayed in the translation interface.
Computer projects can have a complex file structure for storing language files.
You can conserve your project’s file structure when using the web_translate_it client, or manually in the File Manager.
The file structure can vary a lot from one project to another, so we will give you an example of a few language file structures here. It’s very easy to setup.
🔗Simple File Structure
Let’s consider this project:
PROJECT config locales en.yml fr.yml it.yml
The language files are all contained in the
config/locales directory, and all files are differentiated by their locale name. In order to reproduce this architecture in the File Manager, hover the master file name and click on “rename”.
A modal window will pop up.
Edit the path for your master language file. In this case we want to have
config/locales/en.yml. Make sure you tick the “Rename target files as well?” checkbox, and it will automatically rename the other files accordingly. That is,
config/locales/fr.yml for French, and
config/locales/it.yml for Italian. If we had a French Canadian language for that project, it would also create a
🔗Multi-File projects File Structure
If your project contains several master language files, no problem!
PROJECT config locales app en.yml fr.yml it.yml default en.yml fr.yml it.yml
Just repeat the previous explanation for the second master language file.
🔗Structure differentiated by a directory name
Let’s consider the following file structure. Here all the language files have the same name, but are put in directories whose name is the name of the locale.
PROJECT LC en messages.po fr messages.po it messages.po
Do as usual: in the File Manager, rename the Master language file to
LC/en/messages.po. The File Manager is clever enough to rename the target language files
LC/fr/messages.po for French and
LC/it/messages.po for Italian.
🔗Even more complex file structures
Let’s consider this file structure:
PROJECT locales English.po French.po Italian.po
Here we can’t help you to rename all your files at once. You will need to either rename each file individually in the File Manager, or rename your project’s language files to a structure that can be recognised by WebTranslateIt.
For some projects, the language file headers, can include a copyright or other informations that are important to keep. WebTranslateIt keep these headers and allow you to edit them from the web interface, by clicking on the “headers” link.
If you update often or have many linguistic files to upload, we encourage you to have a look at the API, which will allow you to programmatically upload files.
We also made wti, a desktop command-line tool to sync your language files with ease.