Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlokhorst committed May 1, 2016
1 parent 5dbdfaa commit 4a2af9a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Documentation/Examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ There are some points to keep in mind when using Color palettes, see [About Colo
let welcomeMessage = NSLocalizedString("welcome.message", comment: "")
let settingsTitle = NSLocalizedString("title", tableName: "Settings", comment: "")

// Formatted strings
let welcomeName = String(format: NSLocalizedString("welcome.withName", comment: ""), locale: NSLocale.currentLocale(), "Alice")

// Stringsdict files
let progress = String(format: NSLocalizedString("copy.progress", comment: ""), locale: NSLocale.currentLocale(), 4, 23)
```

*With R.swift*
Expand All @@ -87,7 +91,11 @@ let welcomeName = String(format: NSLocalizedString("welcome.withName", comment:
let welcomeMessage = R.string.localizable.welcomeMessage()
let settingsTitle = R.string.settings.title()

// Functions with parameters are generated for format strings
let welcomeName = R.string.localizable.welcomeWithName("Alice")

// Functions with named argument labels are generated for stringsdict keys
let progress = R.string.localizable.copyProgress(completed: 4, total: 23)
```

## Storyboards
Expand Down

0 comments on commit 4a2af9a

Please sign in to comment.