Tightened the source code and README documentations in the library.
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