We're a little over half way through our internship here at Tapadoo, and so far it's been great! In the past couple of weeks though we've had to work on Sundays to try and finish a project that's nearing completion, but hopefully it'll be done soon so we can go back to lazy lie-ins on Sundays once again!
The latest thing I've been learning about here is localisation (or localization). This is something I've never really had to think about in my own projects, since they were mostly personal projects and didn't need to be in any other language than English.
Localising apps is actually quite straight forward, it's no more than a set of key-value tables that get swapped out at runtime, depending on the user's choice of language. One (probably basic) problem I encountered while localising an app to Arabic, was that after changing the language of my Simulator to Arabic, I had no idea how to change it back! After stumbling around the settings menus for a few minutes though, I did eventually find the English button again!
Another problem I encountered was Right-to-Left (RTL) languages are very hard to copy paste/edit in a Left-to Right-language text editor, especially when the two languages are mixed into one sentence and the backspace key can go in either direction!
I was surprised at how much iOS actually handles when it comes to RTL languages, it even flips the UI elements accordingly, when the 'leading' and 'trailing' space constraints are used. I did come accross a situation where the UI elements needed to be in the same positions for both English and Arabic, but that's easily achieved by turning off the 'Respect language direction' option on each constraint.
The OS didn't handle the sliding-menu I was using, or the progress bars though, so those had to be manually mirrored depending on the locale. Mirroring the sliding-menu wasn't too difficult, as the library included functionality for a right-sided menu, it was just a matter of making the right checks and setting the right properties. The progress bars were as easy as just rotating the their entire views bby 180 degrees.
One thing I found a little bit fidgity, was localizing Storyboards and their labels. Each field has a unique ID which you can set the text of in kev-value strings file. You must then run a command to extract all the labels from the Storyboard and generate this key-value strings file, which you can then translate to different languages. Updating label text in the Storyboard causes problems though, as you have to remember to go find the string in the strings file and give it a new translation as it's old translation has been overwritten by the new label. This was a bit annoying when changing a label from 'label:' to 'label' which would have pretty much the same translation. This gets even more annoying when you have no idea what the old translation was or even looked like as was my case with Arabic! I had to go find the text and copy-paste it again - hoping it was the same translation as before!
So overall, I learned that localisation is easier than you might think although it has it's niggles, and that the iOS simulator looks really badass when all the text is in Arabic! ...provided you remember how to change it back!