In principle, I know that in OSX, an app’s resources such as bitmaps and language files are read-only by the app which contains them.
But is there any way to delete some using a shell command (run as sudo?)
What I want to do is delete language files (eg the folder de.lproj ) based upon user choice, so that when the app next runs, it appears in the user’s chosen language rather than whatever the OS is set to be.
I can do it using Finder if I supply an admin password, and it doesn’t break the code signature, so it must be possible by some route.
Im just not familiar enough with shell commands to know what to issue…
I apologize in advanced if you already looked at these, but removing the language files seemed a little extreme. But perhaps I completely misread the intent.
[quote]Jeff, dont do it.
This will break your apps code signature.[/quote]
You would expect so, but It doesn’t seem to do that, and I have talked people through this manually.
Nope. I have people whose locale should be French but want the app to run in English. Changing the whole system is not viable, even temporarily.
I know. And I have considered it. But after trying this approach on even one window, I decided I am not going to go through the whole app and create a system that programatically changes all the menu items based on a database.
Really, we could use a runtime app property that makes this happen.
After all, when a window is displayed /created, the app is getting the string resources after querying the OS locale.
All we need is something that says ‘ignore what you found, use this language instead’
Right now, I know that just deleting the fr.lproj folder achieves exactly what I need, making a French system run in English.
[quote=482622:@Jeff Tullin]how-os-x-chooses-a-language/
Nope. I have people whose locale should be French but want the app to run in English. Changing the whole system is not viable, even temporarily.[/quote]
Jeff, the info on the blog is similar to usage in stackoverflow. If you look at the syntax, “defaults write com.xojo.xojo AppleLanguages -array en”, it doesn’t change the OS language but rather the specific application language. But there are plenty of articles that to use it on Mojave and Catalina one must elevate the privilege of shell and terminal on the target computer. So that may not work for you in all cases.
And indeed it didn’t for me when I tried it on 10.14
Yes, I suspect that may be the best route for me to recommend.
But I still dont see why Xojo couldnt have a simple switch. It gets resources after asking for the locale.
It cant be hard to have a locale override, surely?