Localization Diary #2 – A Pragmatic Approach

August 2, 2016

I realized after the last post that I was probably not using the terms internationalization and localization very precisely. I certainly know the difference, especially after spelunking the Apple docs, but internationalization is just too much of a mouthful. Nevertheless, I’ll try to better from here on.

After making the decision to start with German, I researched 5 translation services. I promised myself not to overanalyze things, and in the spirit of shipping, go a bit more on gut than becoming mired in the idiosyncrasies of picking the absolutely perfect vendor. After a bit of high-level searching, my short list became:

Drilling in a bit, I immediately ruled out Smartling and iBabbleon because they do not specialize in apps. I’ve learned over the years that regardless of what I’m trying to get done, I always end up happier with the results when I hire a specialist.

After a bit more drilling, I disqualified Icanlocalize based on 1) no mention of a project manager to deal with all of the inevitable details of working with the translator, and 2) it was the cheapest, and by a lot. I rarely do well when selecting the low-cost option. It ends up being more work for me and ultimately costing more.

That left Tethras and Applingua. They priced out equally at $0.18US/word. Both included project management. Both appeared to have very good tech to manage the process. Applingua even tests the translation on device, which in the end caused me to go with Tethras. I didn’t want the hassle of resending new builds as I hacked my way through fixing the inevitable problems of trying to jam 10 pounds of German into 5-pound UILabels.

With Tethras selected, I made a cup of coffee and started reading the Apple Internationalization/Localization docs. Within 5 minutes, I realized I was dangerously close to falling into a coma. So in lieu of the Apple docs, I went with this document as my guide. A a bit dated, but the fundamentals are all there in one easy-to-read place.

Next was a long scrape through my source files adding NSLocalizedString macros. I ended up creating a TextExpander snippet ‘nnsl’ = ‘NSLocalizedString(‘ to speed things along.

Note to self: Use NSLocalizedString in every new project from the start and get it out of the way.

I created NextPage 6 years ago, and the Xcode project file hasn’t always fared well during Xcode upgrades. To wit, ‘Base Internationalization’ had somehow become checked in my project settings, but for some reason I didn’t have a Base.lproj dir, nor a de.lproj after I added the German localization. Forutnately, simply selecting my main xib file (yes, no storyboards in NextPage) and localizing it for German with File Inspector created both directories. I then proceeded to localize the rest of the xibs with File Inspector.

In about 6 hours I was finished making the modifications. I created a Localizable strings file by running the following from my project directory:

genstrings

Initially, this resulted in lots of messages like this:

Ambiguous comments are apparently frowned upon by genstrings. Not liking the warning messages, I fixed up my comments and reran genstrings until everything was clean.

Second Note to Self: Just make the NSLocalizedString comment argument identical to the key and get on with life.

Tethras allows only a single file to be uploaded at a time, but happily that can be a zip file. I zipped all of my strings files together and sent them up. Within a few seconds, the Tethras backend had exploded the files, counted the unique words to be translated, and presented a price. A few clicks later, I was checked out of the shopping cart and ready for translation. Almost.

I immediately received an email asking for additional localization instructions. Here are the sorts of things they required, along with my answers:

Official App Name: NextPage 3
App Name Translation: Do not translate the app name  /* This is branding thing */
Translation Style: Informal
Translation Tone: Cheerful   /* “Scary Clown” was not an option */
Target Age Group: Adults
Genre: Music
Description: NextPage is sheet music manager. Musicians load their music PDF files into the app and can then arrange them into set lists. Then, they can page back/forth through the music during live performance by simply tapping, swiping, or using a wireless foot pedal. The app provides markup/annotation tools, a metronome, and other features for practicing and playing live.
App Store URL: <provided>
Additional Instructions:

After submitting all of that, I quickly received a second email saying everything was set to go, and that my expected delivery date was within 2 days.

The next day, I received several questions from the translator via the Tethras portal regarding the context of some of the text. I replied quickly, and by the next morning the entire job of 2,200 words was complete. Delivery on time, as promised.

I downloaded the strings files, rebuilt the app, and was both pleasantly surprised and a bit chagrined. The pleasant surprise was that the translator hadn’t botched the syntax in any of the strings files. They were perfect. The chagrin came when I saw how the verbosity of the German language had wreaked havoc on some of my design. Also, I discovered that I had missed 4 xibs and had forgotten to include the text needed for the App Store IAP entry. I uploaded those for translation and turned my attention to the newly discovered design issues.

Most times, simply widening of the UIButton or UILabel took care of the problem. I already had AutoLayout in place, which ended doing a lot of the heavy lifting for me, but sometimes I did have to help it along. A few other problems ensued.

No Room at the Inn – Variation 1

The German translation of some entries in my Settings menu were being truncated:

Settings Truncated

The answer was to let UITableViewCell handle things by adding:

Settings Code

which resulted in joy:

Settings After

No Room at the Inn – Variation 2

NextPage provides markup tools, and each tool normally provides a hint on its usage in the center of the top toolbar.  In German, some of the hint translations overlapped UIBarButtonItems on either side.

markup_before

Fixing this required some code to display the hint via UIAlertController when the text exceeded a certain length, like so:

markup_after

A compromise to be sure, but certainly not the end of the world.  Taking a huge amount of time to attempt a redesign that preserved the original look simply wasn’t worth it. I’ve never gotten a 5-star review for the markup tips.

Nits

Testing also revealed that I had neglected to localize the CSS and image files included by the HTML files I use for documentation inside the app. Not a big deal to fix, but a detail that was not obvious from the various docs I had read.

Analysis

Tackling German first has probably exposed all of the edge cases where size matters. I’m thinking French, Spanish, and all the rest should require little or no additional work.

I was very pleased with Tethras and recommend them. I think Applingua would be a fine choice also, and I would consider using them for more complex projects requiring a lot testing on devices I don’t have. The payoff just wasn’t there on this particular project.

Previous post: