iOS Internationalization: The Complete Guide

Book description

Internationalize Your iOS Apps for a Global Audience

Sixty percent of iPhone users worldwide aren’t native English speakers, half of the Top 10 iOS app markets are non-English speaking, and app revenue in Asia is soaring while North American growth is flattening. Internationalizing your apps will make your worldwide customer base happy and give you a powerful competitive advantage in the global marketplace. Now, iOS expert Shawn Larson brings together all the knowledge you need to do it.

Larson takes information previously scattered across dozens of blog posts, tutorials, and book chapters and integrates it into one easy-to-navigate resource. He presents step-by-step coverage and practical code for controlling international settings, character encoding, locale and localization, UI adjustments, App Store customizations, and more. You’ll find a sample project in every chapter—including a major three-chapter project guiding you through several key stages of app internationalization.

Coverage includes:

  • Customizing language, region, and locale settings, including date, time, currency, quotation marks, separators, and more

  • Working with character sets, including Unicode and ligatures

  • Coding for locale with NSLocale and locale-specific arguments

  • Systematically prepping your app for localization

  • Leveraging the full power of base localization

  • Generating dot-strings files and working with their key-value pairs

  • Localizing images and app names

  • Effectively using translation services—and avoiding the pitfalls

  • Adjusting your UI to avoid clipped strings in longer languages

  • Using constraint settings to support right-to-left languages

  • Specifying App Store supported territories and pricing tiers

  • Localizing your App Store summary page: name, descriptions, keywords, URLs, screenshots, and EULAs

  • If you're an experienced Objective-C developer, iOS Internationalization will help you expand your iOS market worldwide and capture opportunities that would otherwise be far beyond your grasp.

    All sample code and completed projects may be downloaded at github.com/ShawnLa-i18n.

    Table of contents

    1. About This eBook
    2. Title Page
    3. Copyright Page
    4. Dedication Page
    5. Contents at a Glance
    6. Table of Contents
    7. About the Author
    8. Acknowledgments
    9. We Want to Hear from You!
    10. Reader Services
    11. Introduction
      1. Reader Expectations
      2. How This Book Is Organized
      3. Getting the Sample Code
      4. Contacting the Author
    12. 1. International Settings
      1. System Settings: International
      2. Language
      3. Voice Control
        1. Siri
        2. Voice Dial Only
      4. Keyboards
      5. Calendars
        1. Gregorian
        2. Japanese
        3. Buddhist
      6. Region Format
      7. Representing Dates
      8. Long Versus Short Date Formats
      9. Representing Time
      10. Telephone
      11. Currency
      12. Sorting
      13. Measurements System
      14. Decimal and Thousands Separators
      15. Quotation Marks
      16. Other Callouts
        1. Vertical Text
        2. List Separator
      17. Summary
    13. 2. Characters and Encoding
      1. Characters
        1. Types of Characters
        2. Accented Characters
        3. Chinese Characters
      2. Strings
      3. Code Pages and Encoding
        1. ASCII Character Set
        2. Extended Character Set
        3. ANSI Standard
        4. Asian Character Support: DBCS
      4. Unicode and Encoding
        1. Unicode Planes
        2. Combining Character Sequences
        3. Duplicate Characters
      5. Encoding in Action
        1. UTF-8
        2. UTF-16
      6. Coding Encoding
        1. Example 1: Encoding to ASCII
        2. Example 2: Returning the ASCII Value from a Character
        3. Example 3: Encoding an ASCII String to UTF-8
        4. Example 4: Returning a String from an Encoding URL
      7. Objective-C Encoding Enumerations
      8. Encoding Gone Bad
      9. Diacritics
        1. Precomposed Diacritics
      10. Surrogate Characters
        1. Emoji
      11. Retrieving Characters from Unicode Code Points
      12. Obtaining Unicode Code Points
      13. Glyphs
        1. Contextual Glyphs
        2. Fonts
        3. Ligatures
        4. Code Snippet to Compare Ligatures
      14. Summary
    14. 3. Coding for Locale
      1. NSLocale Class
        1. Locale ID
        2. NSLocale Component Keys
        3. Return Types from NSLocale’s Component Keys
        4. Auto Updating the Locale
      2. Address Book Framework
      3. NSNumberFormatter
      4. NSDate
      5. NSDateFormatter
        1. Predefined Styles
        2. Format Specifiers
        3. Conversion
        4. Date Templates
        5. Date Format "j" Template
      6. NSCalendar
      7. NSDateComponents
        1. Components from a Date
        2. Relative Date Calculations
      8. NSTimeZone
      9. NSString
        1. Initializing a String
        2. Lower- and Uppercase
        3. Searching
        4. Folding Strings
        5. Sorting
      10. Summary
    15. 4. Prepping Your App for Localization
      1. Building an International Exerciser
      2. App Creation Overview
        1. Covered Locale Categories
        2. View Controller Creation
        3. Locale Components Affected by Setting Changes
        4. Auto Updating Locale
      3. Home Screen
        1. Table View Controller
      4. Measurement System
      5. Quotes and Scripts
      6. Calendar and Date Components
      7. Date Formatting
        1. Short, Medium, Long, Full Date Styles
        2. Date Strings to Date Objects
      8. Number Formatting
        1. Decimal, Currency, Percent, and Spelled Out
      9. Contact Names/Address Book Framework
      10. Strings
        1. String Case
        2. Sorting
        3. Exemplar Character Set
      11. Other Locale-Specific Topics
        1. Right-to-Left Languages
        2. Telephone Format
      12. Summary
    16. 5. Localizing Your App
      1. Localization
        1. What Is Localization?
        2. What Gets Localized?
        3. How Do the “Dot-Strings” Files Get Created?
        4. Where Do the Strings Get Parsed?
        5. Generalized Steps to Localize
      2. Localizing a View Controller from the Sample App
        1. Adding Localization to a Project
        2. Localizing Code
        3. The genstrings Command
        4. Copying Localizable.strings Files
        5. Xcode Reference
        6. Localizing UI
      3. Running Under the Localized Language
        1. Translation Results with Japanese
      4. Working with Localized Images
      5. Localizing App Icon Name
      6. Other NSLocalizedString Macros
        1. NSLocalizedStringFromTable()
        2. NSLocalizedStringFromTableInBundle()
        3. NSLocalizedStringWithDefaultValue()
      7. Creating a Generalized Key Name
      8. genstrings Tools
        1. Update_Localization
        2. pygenstrings
      9. Translating to Localized Languages
        1. No “Mad Libs”
        2. Avoid Translation Templates
        3. Translation Services
        4. Importing Files from Translators
      10. Word Order
      11. Plural Forms and the CLDR
        1. What Do We Mean by Quantities?
        2. Plurals Example
        3. Genders
      12. Summary
    17. 6. Adjusting the UI
      1. Auto Layout and Constraints
        1. Internationalization Implications
        2. Avoiding Clipping
        3. Right-to-Left Languages
        4. Keyboards and Screen Coverage
      2. Tools and Testing
        1. Pseudo Localization
        2. Launch Switches
        3. Previewing Rotation in Xcode
      3. UI Localization
        1. Images
        2. Right-to-Left Images
        3. Colors
        4. String Length
        5. Single-Letter Icons
        6. Body-Part Metaphors
        7. Locale Maps
      4. Summary
    18. 7. Submitting Your App
      1. App Submission Requirements
        1. iOS Dev Center
        2. Provisioning Profiles
        3. iTunes Connect
      2. App Store Details
        1. Available Territories
        2. Pricing Tiers
      3. Localizing iTunes Connect Data
        1. Changing Available Territories
        2. Language Mapping
        3. Adding Language Support
        4. Field Breakout
      4. Apple Promotional Materials
      5. Summary
    19. A. Case Study: Boom Beach
    20. B. Web Resources
    21. Code Snippets

    Product information

    • Title: iOS Internationalization: The Complete Guide
    • Author(s):
    • Release date: December 2014
    • Publisher(s): Addison-Wesley Professional
    • ISBN: 9780134037776