← Back to Localizable Strings Merge
To increase the user base, and thereby boost profits, all developers must localize their applications for iOS or OS X into multiple languages: users don't buy and don't use an application written in a language they don't understand.
The standard way to internationalize an application is based on the command line tool genstrings that analyzes the source files searching the macro NSLocalizedString and generates a Localizable.strings file that will contain all strings to be translated. This procedure simplifies the creation of files for translation, but it has some serious limitations; let's see them, and especially look at how Localizable Strings Merge can literally save us hours of work.
Genstrings limits
Genstrings is a command line tool: if for many developers this is hardly a problem, it is certainly less intuitive and pleasant than an application with a simple and elegant graphical user interface.
But the real problem is that genstrings is unable to merge the strings. Let's see what it means and what it implies.
This is the normal process to internationalize and localize an application for OS X or iOS:
The translation often takes several days, so developers typically proceed in parallel with the completion of development and the relevant tests. It is quite common -during this phase- that some strings are refined and others are added. A merge of the translated terms and those introduced in the meantime becomes necessary after that, a task that even in the simplest cases, as it has to be done completely by hand, becomes extremely laborious and error-prone.
The problem of the merge is evident when there is a large development team that relies on other companies or outsources their translations, but even the single developer who translates by himself the app may encounter the same problem. For instance think about the case in which we have already sold the version 1.0 of an application, complete with translations. When we are working on version 2.0 we don't want to rebuild them from scratch, but we want to look only at the differences.
In these situations comes in handy Localizable Strings Merge.
Localizable Strings Merge introduction
Localizable Strings Merge essentially performs the generation of the Localizable.strings file from the source files (as genstrings, but through a simple and elegant graphical interface) and especially the merge of translated or partially translated files.
The graphical interface is divided into two sections: the left one is dedicated to the source files from which "extract" the strings to be translated, while the right side is the container for the files already translated that must be updated with informations coming from the left side.
The clear and essential style in this process will guide us through choices that eliminate any ambiguity. But let's see it in detail.
Localizable.strings files creation
To generate the Localizable.strings files to be sent to the translators just drag and drop on the left side all source files. Alternatively, we can directly drag and drop the folder containing the project: in this case all and only the source files will be automatically filtered out (we can then operate refinements by removing unnecessary files).
Now the button "Generate Strings" becomes enabled. A process will start upon clicking it and then we will be asked where to save the file Localizable.strings generated from scratch, containing all the strings to translate. A copy of this file must then be sent to each translator.
Translated files merging
When the translators have sent us the files completed with translations, if in the meantime we have changed something we should do the "merge" which will join the already translated strings with all those that might be added.
To perform the merge we drag and drop in the left side all source files, just as we did in last section.
At this point, however, instead of clicking on the "Generate Strings", drag and drop in the right side the Localizable.strings files received by the translators, one for each language. The button below will change its name to "Merge Strings":
Upon clicking it, the Localizable.strings file will be automatically updated by joining the strings added in the meantime and eliminating those which are translated but no longer present in the source files. Our advice is to always leave on the option "Backup strings files before merge" to ensure the creation of a backup copy with the same name plus a .backup extension before overwriting a Localizable.strings file.
At this point, if we are going to open the new Localizable.strings files, we will find the new strings marked with the tag NEW (we can change the tag-value from the application preferences):
If for some reason a string has been removed from the sources, by default it is also automatically deleted from the translated files (we can change this from the application preferences). This is very useful because it ensures that all the strings in the Localizable.strings file are used in the application.
Conclusion
Localizable Strings Merge not only simplifies and speeds up the translations merge but also assures us that localization files are properly formatted and sorted, that nothing is missing and, least of all, it saves us precious time and money.