Tasky (localized storyboard)
Updated for iOS 9 RTL support
- in Storyboard, use Auto-Layout
TitleText.TextAlignment = UITextAlignment.Natural;alignment in code, not
- see Apple's guide for other advice eg regarding images.
Spanish and other LTR languages
You can localize all the strings used in a storyboard by creating a
file named the same as the storyboard (placed in relevant
and creating strings for each control/property, eg:
"SXg-TT-IwM.placeholder" = "nombre de la tarea"; "Pqa-aa-ury.placeholder"= "otra información de tarea"; "zwR-D9-hM1.text" = "Detalles de la tarea"; "bAM-2j-Rzw.text" = "Notas"; "NF3-h8-xmR.text" = "Completo"; "MWt-Ya-pMf.normalTitle" = "Guardar"; "IGr-pR-05L.normalTitle" = "Eliminar";
where the first part of each key is the control's Localization ID in the storyboard,
and the second part is the string property to set (eg a UITextInput's
property, or a UILabel's
Don't forget these entries in the
Info.plist (for the languages you wish to support):
<key>CFBundleLocalizations</key> <array> <string>de</string> <string>es</string> <string>ja</string> </array> <key>CFBundleDevelopmentRegion</key> <string>en</string>
WARNING: Using Size Classes (Universal Storyboards)
This sample does not use Size Classes, but rather is specifically targeting iPhone in the storyboard.
If you attempt to localize a Storyboard that uses Size Classes you may run into this issue (on StackOverflow). The storyboard elements fail to be localized, and always show the base language.
The easy/hack fix is to duplicate your storyboard strings file into
(apparently under-the-covers the universal storyboard is duplicated into
~iphone versions; which causes the
.strings file load to fail because
the filenames don't match exactly)