Repository navigation
Localization
TimeLabels can now write labels in your app's language. You supply the words and a locale; the package ships no translations.
Added
TimeLabel.Language: the words and locale used to write labels, with.englishas the defaultTimeLabel.UnitForm: tells your language which spelling of a unit is neededlanguage:parameter on every label function andDateextension.timeLabelLanguage(_:)view modifier andtimeLabelLanguageenvironment value forTimeLabelTextTimeLabelText { now, language in ... }for custom live labels
Changed
dateTime'sseparator:is now optional and defaults to the language's separator (" at " in English)
Compatibility
- Output without
language:is the same as in 2.0.0 - Code that stores a label function in a typed variable needs the new parameter added to its type
Limitations
spellNumbersdoesn't adjust for grammatical gender or case- Counts and countdown timers always use the digits 0–9
See Localization in the README for setup.
Full Changelog: 2.0.0...2.1.0