Swift 6.4 migration and exhancements (#1)
This PR contains the work done to update the library and the attached example project to use the Swift 6.4 computer as a minimum supported version and also, to use the latest features introduced in it. Reviewed-on: #1 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
This commit was merged in pull request #1.
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
internal import CPlaydate
|
||||
|
||||
extension System {
|
||||
/// The system language.
|
||||
/// A system language. Wraps `PDLanguage`.
|
||||
public enum Language: UInt32, Sendable {
|
||||
case english = 0
|
||||
case japanese = 1
|
||||
/// Only meaningful as an argument to `localizedText(forKey:language:)`.
|
||||
/// The current system language; only meaningful for `localizedText(forKey:language:)`.
|
||||
case system = 2
|
||||
|
||||
// Unknown C values fall back to English.
|
||||
init(_ language: PDLanguage) {
|
||||
self = Language(rawValue: UInt32(language.rawValue)) ?? .english
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user