Skip to content

Instantly share code, notes, and snippets.

View carrchr's full-sized avatar

Chris Carr carrchr

View GitHub Profile
@carrchr
carrchr / Example.swift
Created May 31, 2016 01:51 — forked from beccadax/Example.swift
Elegant handling of localizable strings in Swift.
let color = "blue"
let num = 42
localized("Colorless green ideas sleep furiously.")
localized("Colorless \(color) ideas sleep furiously.")
localized("\(num.formatted("%05d")) colorless green ideas sleep furiously.")