Post

Replies

Boosts

Views

Activity

Reply to Launch argument "-AppleLocale en_US" doesn't change measurement system(units) to "US" on MacOs
My region - Russia and Measurement units: Metric. I’m testing with Xcode 12.4 on macOS 11.2.3 with my Mac’s region set to United Kingdom (I also tried Australia, just in case it was specific to the oddball UK measurement system). Could you please click "Advanced..." at Language & Region Preferences and change Measurement units to "Metric". It looks like that AppleLocale or AppleMetricUnits doesn't override measurement units
Apr ’21
Reply to Launch argument "-AppleLocale en_US" doesn't change measurement system(units) to "US" on MacOs
Quinn, thank you for reply! I've just tried AppleLocale en_US -AppleMetricUnits false/ -AppleMeasurementUnits Inches but unfortunately it doesn't help. I've updated my example project at https://github.com/yuri-qualtie/UseMetricSystemDemo in case you want take a look. We definitely won't use these arguments in production code. It's just for UITests I put some simple code example with print but actually I test in the example App - https://github.com/yuri-qualtie/UseMetricSystemDemo by following code: struct ContentView: View {     var body: some View {         VStack {             Text("Current Locale: \(Locale.current.regionCode!)")             Text("Curren Locale uses metric system: " + "\(Locale.current.usesMetricSystem)")                 .padding()             Text("US Locale: \(Locale(identifier: "en_US").regionCode!)")             Text("US uses metric system: " + "\(Locale(identifier: "en_US").usesMetricSystem)")                 .padding()         }     } } So I always see: Current Locale: US Curren Locale uses metric system: true US Locale: US US uses metric system: false
Apr ’21