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.pdf
Search
Aydar
December 14, 2017
Programming
67
0
Share
Localization.pdf
Presentation for the Munich iOS Developers Meetup
Aydar
December 14, 2017
More Decks by Aydar
See All by Aydar
The Realities of A/B Testing
aydarin
0
92
Development on Kotlin/Native and Swift
aydarin
1
130
AppCode under the hood
aydarin
1
340
Bridging the gap between Kotlin and Swift
aydarin
0
140
A look into AB testing
aydarin
0
90
Exploring MVVM-C
aydarin
0
180
Coordinate your app
aydarin
1
100
MVVM vs MVP
aydarin
1
290
image_optimization.pdf
aydarin
0
70
Other Decks in Programming
See All in Programming
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
300
2026_04_15_量子計算をパズルとして解く
hideakitakechi
0
120
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
170
CursorとClaudeCodeとCodexとOpenCodeを実際に比較してみた
terisuke
1
500
Don't Prompt Harder, Structure Better
kitasuke
0
790
🦞OpenClaw works with AWS
licux
1
290
t *testing.T は どこからやってくるの?
otakakot
1
800
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
280
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
150
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
320
JAWS-UG横浜 #100 祝・第100回スペシャルAWS は VPC レスの時代へ
maroon1st
0
180
Road to RubyKaigi: Play Hard(ware)
makicamel
1
490
Featured
See All Featured
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
220
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Visualization
eitanlees
150
17k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
200
Leo the Paperboy
mayatellez
7
1.7k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
240
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
330
Producing Creativity
orderedlist
PRO
348
40k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
120
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
180
Transcript
Improve your app localization with .stringsdict Aydar Mukhametzyanov, Freeletics
Agenda 1.The story 2.Handling plurals with .stringsdict 3.Adaptive strings
Who knows what .stringsdict is?
1.The story 2.Handling plurals with .stringsdict 3.Adaptive strings
!"#$ %&'( The story
The story !"#$ %&'( ) * +
The story Category Count ! * One 1 1 month
1 miesiąc Few 2-4, 22-24, 32-34,… 2 months 2 miesiące Many 5-19, 100,… 5 months 5 miesięcy Other 0.0-1.5, 10.0 1.5 months 1.5 miesiąca
The story if count == 1 { // one }
else { // many } !
The story if count >= 5 && count <= 19
{ // many } else if lastDigit == 1 { // one } else if lastDigit > 1 && lastDigit < 5 { // few } else { // many } )
1.The story 2.Handling plurals with .stringsdict 3.Adaptive strings
Handling plurals { login_button_title: Login, … }
Handling plurals { login_button_title: Login, … days_one: %d day, days_many:
%d days, … }
Handling plurals { login_button_title: Login, … days_one: %d day, days_many:
%d days, … } if count == 1 { // Use days_one } else { // Use days_many }
Handling plurals { login_button_title: Login, … days: { one: %d
day, many: %d days } … }
Handling plurals { login_button_title: Login, … days: { one: %d
day, many: %d days } … } String.localizedString(key: “days", count: count)
Handling plurals
Handling plurals
Handling plurals Localizable.sctringsdict Key Format Localization Plural cases
Handling plurals
Handling plurals Plural cases: zero, one, two, few, many, other
http://www.unicode.org/cldr/charts/29/supplemental/language_plural_rules.html
Handling plurals
How to use? Handling plurals
Handling plurals let format = NSLocalizedString("days", comment: "") let string
= String.localizedStringWithFormat(format, 12) How to use?
Handling plurals let format = NSLocalizedString("days", comment: "") let string
= String.localizedStringWithFormat(format, 12) New localization doesn’t bring code changes
Handling plurals • Localizable.stringsdict • Specific format for plural rules
• Available since iOS 7
1.The story 2.Handling plurals with .stringsdict 3.Adaptive strings
Adaptive strings
Adaptive strings Key “M width available on the screen” (WWDC
2015, Session 227, 15:06) Localization options
Adaptive strings “M width available on the screen” (WWDC 2015,
Session 227, 15:06)
How to use? Adaptive strings
Adaptive strings textLabel.text = NSLocalizedString("gdp", comment: "") How to use?
Adaptive strings textLabel.text = NSLocalizedString("gdp", comment: "") New localization doesn’t
bring code changes
Adaptive strings • Specific format for adaptive strings • Easy
to start using • Available since iOS 9
Resources • WWDC 2013 Session 219: Making Your App World-Ready
• WWDC 2015 Session 227: What’s new in Internationalization • WWDC 2017 Session 401: Localizing with Xcode 9 • Demo app: https://github.com/aydarin/localizationdemo Contacts aydar.mukh
[email protected]
aydarin
Demo