When a nib file has changed, inside the Base.lproj folder: ibtool Change –generate-strings-file New Strings.strings New in i OS7 stringsdict to take into account plurality and/or gender Localized propertylist: result = [NSString localized String With Format: NSLocalized String(@”%d file(s) remaining”, @”comment”, n] NSData Detector to detect phone numbers, Addresses, make them into links 2014 V201 Advanced topics in internationalization Language and Region Settings – Primary language – Specify preferred languages in order – User can specify preferred language although it isn’t available in the OS but your app can be localised with that language – Specify the region independently of the localization i OS8 – when the text encoding type is not provided it can be abled to guess with the API i OS8 – NSDate Components Formatter For displaying duration or amounts of time (1 hour, 50 minutes) i OS8 – NSDate Interval Formatter For displaying time intervals ( AM – PM) i OS8 – NSEnergy Formatter, NSLength Formatter, NSMass Formatter i OS8 – Formatting Context Tells how the formatted text should be written, depending on how and where it appears: – NSFormatting Context Stand Alone – NSFormatting Context List Item – NSFormatting Context Beginning Of Sentence – NSFormatting Context Middle Of Sentence – NSFormatting Context Dynamic, once it is inserted in the formatted string it resolves beginning, middle of sentence.Tip In case you need to know the language the app is running because you want to show something running in Japanese but not in english.Put a localised resource in the NSBundle with value YES or NO on the required resource Locale Change eg - (void user Change Locale: (NSNotification *) notification{ my Formatter.locale = [NSLocale current Locale]; my Format = [NSDate Formatter date Format From Template: my Template option:0 locale:my Formatter.locale] [my View set Needs Display]; } ABRecord Ref record = ABPerson Create(); ABRecord Set Value(record, k ABPerson First Name Property, (CFString Ref) first Name, NULL); ABRecord Set Value(record, k ABPerson Last Name Property, (CFString Ref)last Name, NULL); NSString *displayname = (NSString *)ABRecord Copy Composite Name(record); CFRelease(record); Text Directionality Avoid: [text Field set Base Writing Direction: NSWriting Direction Right To Left for Range:range]; Use: [text Field set Base Writing Driection: NSWriting Direction Natural for Range:range]; This guesses the directionality of the text, analyses the first characters and decides the direction.

autoupdatingcurrentlocale-10

This is indicated with -marked Text Range if it exists most likely the live search or similar won’t work as the typed in text is not the final text the user wants to input.

2014 V201 Localising with Xcode6 Export/import xliff format Preview localizations Recap for project – use comments on NSLocalized String – use a different strings file per View Controller/Screen – Pseudolocalize with macros – use .stringsdict for plurals and gender control good resource listen to locale Did Change notification or use +[NSLocale autoupdating Current Locale].

It will never cease to amaze me how difficult it is to correctly handle times and dates in computer applications.

2012 V244 Internationalization Tips and Tricks NSLocale + current Locale: returns static object that doesn’t change + autoupdating Current Locale: picks up any changes to dateformat settings, time to show in 12h format, etc.

NSCurrent Locale Did Change Notification: when the settings change, received this notification the UI should update to new locale Localising Text Generating Strings entries from source files find .

-name \*.m | xargs genstrings -o en.lproj/ Searches for NSLocalized String(@”key”, @”description”) and translates to: /* description */ “key” = “key” Arabic being RTL can contain LTR text e.g: Brand names Visually text is shown RTL but when the string is stored in memory it is stored in a single logical order LTR.When searching through string character by character or word by word.This directionality needs to be taken in consideration Not all characters fit in a unichar.Affects when using methods like character at index.Avoid: -character At Index: -length -precomposed String With Canonical Mapping Use: -enumerate Substrings In Range:options:using Block: Custom Macros ITTRoot View Controller String(@"key", @"description"); NSString* ITTRoot View Controller STring(NSString *key, NSString *comment){ NSBundle *b = [NSBundle main Bundle]; NSString *str = [b localized String For Key:key value:nil table:@"ITTRoot View Controller"]; #if DEBUG str = ITTPseudolocalize(str); #endif return str; } NSTime Zone: instead of being relative to a specific point in time it is relative to coordinated universal time.NSDate Components Portions of a calendrical date, the various parts of the formatted human readable date Unit lengths No unit conversion but NSLocale can tell you what currency/unit should be used Unlocalized numbers strto*_l for the same purposes as the NSCalendar Images [UIImage image Named]; Uses NSBundle and this one takes the language into account 2013 V219 Making Your App World-Ready Use Base Internationalization – Edit only one set of nib files – String file is generated for each storyboard and nib file – localizers only need to edit the strings file – use autolayout with base internationalization ibtool generates a strings file for you.