Skip to content
Browse files

localization.md typo

  • Loading branch information...
1 parent 08e682d commit 453caa9c4400f1f0387cccbfef039e16c8369435 @groue committed Aug 20, 2012
Showing with 8 additions and 8 deletions.
  1. +8 −8 Guides/sample_code/localization.md
View
16 Guides/sample_code/localization.md
@@ -144,18 +144,18 @@ Before diving in the sample code, let's first describe out strategy:
`Hello %@, do you know %@?`
2. We'll gather the *format arguments*:
- - `@"Arthur"`
- - `@"Barbara"`
+ - `Arthur`
+ - `Barbara`
3. We'll localize the localizable format string with `NSLocalizedString`, that will give us the *localized format string*:
- - `@"Hello %@, do you know %@?"`
- - `@"Bonjour %@, est-ce que tu connais %@ ?"`
- - `@"Hola %@, sabes %@?"`
+ - `Hello %@, do you know %@?`
+ - `Bonjour %@, est-ce que tu connais %@ ?`
+ - `Hola %@, sabes %@?`
4. We'll finally use `[NSString stringWithFormat:]`, with the localized format string, and format arguments:
- - `@"Hello Arthur, do you know Barbara?"`
- - `@"Bonjour Arthur, est-ce que tu connais Barbara ?"`
- - `@"Hola Arthur, sabes Barbara?"`
+ - `Hello Arthur, do you know Barbara?`
+ - `Bonjour Arthur, est-ce que tu connais Barbara ?`
+ - `Hola Arthur, sabes Barbara?`
The tricky part is building the *localizable format string* and extracting the *format arguments*. We could most certainly "manually" parse the inner template string of the section, `Hello {{name1}}, do you know {{name2}}?`. However, we'll take a more robust and reusable path.

0 comments on commit 453caa9

Please sign in to comment.
Something went wrong with that request. Please try again.