In my mac, when i call pprint(sys.get_sys_info()), it return result is in a mess:
the device_language,language,system_version all wrong,
My macos version:
My language should be zh
Make sure that you have all the languages your game supports in game.project-> macOS-> Localizations
Defold project settings
macOS API will not return a language which isn’t specified in this list. If you have only en
there, then it will always return en
.
This is my setting:
But still return:
{ --[[0x10ba43b90]]
device_model = “”,
manufacturer = “”,
system_version = “21.6.0”,
api_version = “”,
language = “en”,
device_language = “en”,
territory = “CN”,
gmt_offset = 480,
device_ident = “”,
user_agent = “”,
system_name = “Darwin”
}
Do you check in the editor? If so, please check in the bundle. I remember that we had issues with the build and plist the build takes.
With the bundle, I’ll be sure. If it behaves the same, please create a ticket in our GitHub tracker.
When i build in macos, where is the bundle location.Is it under the build directory:
I can not find the bundle
When i make a bundle from project->bundle->macos application,the plist file:
And the sys. get_sys_info() return result is correct.What is the difference between “build” and “make mac bundle”.
It’s because when we run build, we run it not as *.app
but as executable. This executable doesn’t take plist
into account.
We have a ticket to fix that: https://github.com/defold/defold/issues/3854
But good news for you here is that in the released version of your game (and it’s always bundle) everything will be fine.
Ok, Many Thanks.