Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Localization by Ameir Al-Zoubi
Search
Triangle Cocoa
June 30, 2012
Programming
2
170
Localization by Ameir Al-Zoubi
Slides from @ameir's talk on Localization of iOS applications at CocoaHeads June 2012 in Raleigh, NC
Triangle Cocoa
June 30, 2012
Tweet
Share
More Decks by Triangle Cocoa
See All by Triangle Cocoa
App Store Secrets by Lawrence Ingraham
trianglecocoa
1
230
iPhone 5 and You! by Ameir Al-Zoubi
trianglecocoa
0
150
Grand Central Dispatch by Jody Hagins
trianglecocoa
2
430
Instruments: Leaks by Trevor Brown
trianglecocoa
5
120
Foundation Collections by Kevin Conner
trianglecocoa
3
200
Multithreaded Drawing by Eric Lanz
trianglecocoa
3
180
Unburdened ViewControllers by Jay Thrash
trianglecocoa
9
11k
Automated Acceptance Testing by Josh Johnson
trianglecocoa
4
150
Understanding UIResponder by Dirk Smith
trianglecocoa
5
240
Other Decks in Programming
See All in Programming
CircleCIを活用して AWSへの継続的デリバリーを 実践する
coconala_engineer
1
110
ファイル先頭の use の意味、説明できますか? 〜PHP の namespace と autoloading の関係を正しく理解しよう〜 / namespace and autoloading in php
okashoi
2
470
App Router への移行は「改善」となり得るのか?/ Can migration to App Router be an improvement
takefumiyoshii
1
140
incrementalモデルの理解を深める
ikkimiyazaki
2
640
9年開発を牽引して見えてきた、共通化すべきものと個別でつくるもの ~プログラム言語~
shinout
1
300
TCA魔法学入門🪄
dazy
0
280
ここ1~2年くらいで 使えるようになった(主要ブラウザーの最新版 がすべて対応した ) ウェブの新機能について ランダムに喋る!
myzkyy
9
6.5k
LLMチャットボットのアプリケーション設計Tips
os1ma
4
670
htmx is fun!
codehex
2
190
Laravel OpenAPIによる"辛くない"スキーマ駆動開発
kentaroutakeda
2
2.1k
Some Quick Ideas To Improve Your Tests ( #jassttokyo )
teyamagu
PRO
2
2.3k
Deep Dive 大規模システムアーキテクチャ/開発組織エンジニアリング / Deep Dive Large-Scale System Architecture, Development Organization Engineering
nrslib
15
2.9k
Featured
See All Featured
Infographics Made Easy
chrislema
237
18k
Web development in the modern age
philhawksworth
201
10k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
1
3.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
319
20k
Thoughts on Productivity
jonyablonski
57
3.8k
Teambox: Starting and Learning
jrom
126
8.4k
Why Our Code Smells
bkeepers
PRO
330
56k
Become a Pro
speakerdeck
PRO
8
4.4k
Large-scale JavaScript Application Architecture
addyosmani
501
110k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
18
1.7k
The Power of CSS Pseudo Elements
geoffreycrofte
58
4.9k
Designing on Purpose - Digital PM Summit 2013
jponch
109
6.4k
Transcript
Localization & Internationalization
Localization & Internationalization Mo’ Languages = Mo’ Money
None
365 Million iOS devices
365 Million iOS devices 155 Countries
365 Million iOS devices 155 Countries
Localizing Resources • Used to localize any resource (strings, images,
xibs, etc) • Creates lproj folders to place resources • No additional code needed
String Tables • Default “localizable.strings” • Stored as Key-Value pairs
genstrings • Built in to Mac OS X • Automatically
generate strings file • Creates key and comment
Custom Tables • NSLocalizedString() just calls [[NSBundle mainBundle] localizedStringForKey:value:table:] •
you can make myLocalizable.strings • and myLocalizedString()
Text Tips • Don’t overload keys • Be specific •
Building strings • Making string plural • compare vs localizedStandardCompare • Direction • characterAtIndex & length are no good
Dates & Time • Always use NSDateFormatter • Automatically uses
current system settings • NSCurrentLocaleDidChangeNotification
Date & Time Formats • NSDateFormatterShortStyle • dateFormatFromTemplate:options:locale • @"j"
for getting proper AM/PM/24H
NSCalendar • autoupdatingCurrentCalendar • NSGregorianCalendar isn’t the only calendar •
NSDateComponents represents portions of the calendrical date
Numbers • NSNumberFormatter • Uses correct char set, decimal separator,
currency, etc. • Other units you convert yourselves (lb vs kg, etc)
Number Tips • Avoid stringWithFormat • New in iOS 6
is localizedStringWithFormat • Parsing with NSNumberFormatter not intValue
Localized Images • Can localize in Xcode like any other
resource • If possible, avoid the need to localize • Avoid text • Use generic and stretchable images • Avoid word-play with images
Finally • Its easy to prepare your app for localization
even if you have no localized content yet • Be aware of other locales, languages and cultures • Use the Built-in APIs. They know what they’re doing!