SlideShare a Scribd company logo
Localization and Accessibility on iOS
LOCALIZATION AND
ACCESSIBILITY
AGENDA
Localizing Strings
Localizing Storyboards
Testing Localization
Locales
Accessibility
LOCALIZING STRINGS
LOCALIZING STRINGS
Requires developer to use specific API to
retrieve strings in code
Additionally need .strings file with translation for
each language
ADDING LOCALIZED STRINGS TO
YOUR PROJECT - 1
Generate a localized strings file using the
following command:
find . -name *.swift | xargs genstrings -o .
Searches for all occurrences of NSLocalizedString

and extracts keys and comments into a separate file
ADDING LOCALIZED STRINGS TO
YOUR PROJECT - 2
Add the Localizable.strings file to your project:
ADDING LOCALIZED STRINGS TO
YOUR PROJECT - 3
Add a new language to your project:
ADDING LOCALIZED STRINGS TO
YOUR PROJECT - 4
Add a new localization to your Localizable.strings file:
LOCALIZING STRINGS IN CODE
// Shortest version of NSLocalizedString; comment is used to inform translator
// about the role of this string
mainLabel.text = NSLocalizedString("com.makeschool.helloString", comment: "The string that greets
the user")
// Longest version of NSLocalizedString; You can choose which strings file from which
// bundle you want to use. You can also provide a default translation value in case
// the key cannot be found in the table
mainLabel.text = NSLocalizedString("com.makeschool.helloString", tableName: "Other", bundle:
NSBundle.mainBundle(), value: "Hello World", comment: "The string that greets the user")
LOCALIZING STORYBOARDS
LOCALIZING STORYBOARDS
TESTING LOCALIZATION
TESTING LOCALIZATION
TESTING LOCALIZATION
TESTING LOCALIZATION
LOCALES
LOCALES
Besides the language, the region we live in
influences localization
Examples: Date formatting, currency symbols,
time zones
LOCALES
dateLabel.text = NSDateFormatter.localizedStringFromDate(NSDate(),
dateStyle: .MediumStyle, timeStyle: .MediumStyle)
23.10.2015, 08:35:31 Oct 23, 2015, 8:26:12 AM
German Locale (de-DE) US Locale (en-US)
ACCESSIBILITY
ACCESSIBILITY
Very important when building custom views!
They are not accessible by default:
self.isAccessibilityElement = true
Can enhance standard view components by
providing hints, labels, traits and values
ACCESSIBILITY
accessibilityLabel short description of the
control, e.g. “Save” for button, “Rating” for label
accessibilityHint helps the user to understand
results of an action. E.g. “Saves the Document”, “Clears
the text”
ACCESSIBILITY
accessibilityTraits collection of constants that
describe the type of control and/or how it should be
treated, e.g: UIAccessibilityTraitImage,
UIAccessibilityTraitNotEnabled, etc.
accessibilityValue Used to describe the value of
a none-label UI component. E.g. “50%” for a progress
bar. “9 out of 10” for a rating view.
ACCESSIBILITY
Accessibility parameters can be defined in
Interface Builder and in code!
SUMMARY
SUMMARY
Localization and Accessibility are important to
make your app available to a broader audience
Xcode / iOS provide tooling that allow you to
implement localization and accessibility with very
little effort
ADDITIONAL RESOURCES
ADDITIONAL RESOURCES
Apple: Internationalization and Localization Guide
Apple: Formatting Data Using the Locale Setting
AltConf Talk: Localization on iOS
Apple: Accessibility Programming Guide for iOS
UIAccessibility Class Reference

More Related Content

PDF
Xcode Project Infrastructure
PDF
Intro to Core Data
KEY
Core Data
ODP
Introduction to Knockout Js
PDF
Core Data with Swift 3.0
ODP
Scal`a`ngular - Scala and Angular
PDF
Dicoding Developer Coaching #19: Android | Menyimpan Database Secara Local di...
ZIP
Cappuccino - A Javascript Application Framework
Xcode Project Infrastructure
Intro to Core Data
Core Data
Introduction to Knockout Js
Core Data with Swift 3.0
Scal`a`ngular - Scala and Angular
Dicoding Developer Coaching #19: Android | Menyimpan Database Secara Local di...
Cappuccino - A Javascript Application Framework

What's hot (16)

PDF
23 ijaprr vol1-3-25-31iqra
PPTX
Creating data with the test data builder pattern
PPTX
Introduction to React JS for beginners
PPTX
Angular 2
PPTX
Azure functions
PDF
An Introduction to Redux
PDF
An approach to responsive, realtime with Backbone.js and WebSockets
PPTX
Its time to React.js
PPTX
Ext Js introduction and new features in Ext Js 6
PPTX
DDD, CQRS and testing with ASP.Net MVC
PPT
Web Services with Objective-C
PDF
Dicoding Developer Coaching #31: Android | Menerapkan Clean Architecture di A...
PPTX
Introduction to React JS
PDF
mobile in the cloud with diamonds. improved.
PPTX
Type script
23 ijaprr vol1-3-25-31iqra
Creating data with the test data builder pattern
Introduction to React JS for beginners
Angular 2
Azure functions
An Introduction to Redux
An approach to responsive, realtime with Backbone.js and WebSockets
Its time to React.js
Ext Js introduction and new features in Ext Js 6
DDD, CQRS and testing with ASP.Net MVC
Web Services with Objective-C
Dicoding Developer Coaching #31: Android | Menerapkan Clean Architecture di A...
Introduction to React JS
mobile in the cloud with diamonds. improved.
Type script
Ad

Viewers also liked (20)

PDF
Layout with Stack View, Table View, and Collection View
PDF
Error Handling in Swift
PDF
Distributing information on iOS
PDF
Advanced Core Data
PDF
Client Server Communication on iOS
PDF
Swift 2 intro
PDF
Dependency Management on iOS
PDF
Swift Objective-C Interop
PDF
Client Server Security with Flask and iOS
PDF
Client Server Synchronization iOS
PDF
Standard libraries on iOS
PDF
Make School 2017 - Mastering iOS Development
PDF
Multithreading on iOS
PDF
Intro to iOS Application Architecture
PDF
Memory Management on iOS
PDF
Core Data presentation
PDF
iOS Layout Overview
PDF
Persistence on iOS
PDF
Building a Backend with Flask
PDF
Automated Testing on iOS
Layout with Stack View, Table View, and Collection View
Error Handling in Swift
Distributing information on iOS
Advanced Core Data
Client Server Communication on iOS
Swift 2 intro
Dependency Management on iOS
Swift Objective-C Interop
Client Server Security with Flask and iOS
Client Server Synchronization iOS
Standard libraries on iOS
Make School 2017 - Mastering iOS Development
Multithreading on iOS
Intro to iOS Application Architecture
Memory Management on iOS
Core Data presentation
iOS Layout Overview
Persistence on iOS
Building a Backend with Flask
Automated Testing on iOS
Ad

Similar to Localization and Accessibility on iOS (20)

PPTX
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
PDF
Language Server Protocol - Why the Hype?
DOCX
C# Unit 1 notes
PDF
Compiler Construction | Lecture 6 | Introduction to Static Analysis
PDF
Elasticsearch Basics
PPT
Linq
PPT
ActionScript 3.0 Fundamentals
PPT
iOS Application Development
PPT
What's New for Developers in SQL Server 2008?
PPT
SQL Server 2008 Overview
PPTX
INTRODUCTION-TO-VB (1).pptx introduction
PPTX
INTRODUCTION-TO-VB (2)-PROJECT POWERPOINT.pptx
DOCX
csharp.docx
PPT
Smoothing Your Java with DSLs
PPTX
8-Roslyn for microsoft software framework.pptx
ODP
Code Analysis and Refactoring with CDT
PDF
Programming in Scala - Lecture One
PPTX
Scripting in InduSoft Web Studio
PPTX
01 Database Management (re-uploaded)
PDF
Ppt on visual basics
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Language Server Protocol - Why the Hype?
C# Unit 1 notes
Compiler Construction | Lecture 6 | Introduction to Static Analysis
Elasticsearch Basics
Linq
ActionScript 3.0 Fundamentals
iOS Application Development
What's New for Developers in SQL Server 2008?
SQL Server 2008 Overview
INTRODUCTION-TO-VB (1).pptx introduction
INTRODUCTION-TO-VB (2)-PROJECT POWERPOINT.pptx
csharp.docx
Smoothing Your Java with DSLs
8-Roslyn for microsoft software framework.pptx
Code Analysis and Refactoring with CDT
Programming in Scala - Lecture One
Scripting in InduSoft Web Studio
01 Database Management (re-uploaded)
Ppt on visual basics

Recently uploaded (20)

PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
medical staffing services at VALiNTRY
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Nekopoi APK 2025 free lastest update
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
ai tools demonstartion for schools and inter college
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
How Creative Agencies Leverage Project Management Software.pdf
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
medical staffing services at VALiNTRY
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Nekopoi APK 2025 free lastest update
Softaken Excel to vCard Converter Software.pdf
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Upgrade and Innovation Strategies for SAP ERP Customers
PTS Company Brochure 2025 (1).pdf.......
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Design an Analysis of Algorithms I-SECS-1021-03
How to Migrate SBCGlobal Email to Yahoo Easily
Navsoft: AI-Powered Business Solutions & Custom Software Development
2025 Textile ERP Trends: SAP, Odoo & Oracle
ai tools demonstartion for schools and inter college
Internet Downloader Manager (IDM) Crack 6.42 Build 41

Localization and Accessibility on iOS