Macos call sys.get_sys_info() return wrong information

In my mac, when i call pprint(sys.get_sys_info()), it return result is in a mess:
image
the device_language,language,system_version all wrong,
My macos version:
image
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.

2 Likes

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:
image
I can not find the bundle

To make a bundle, use this option:

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.

3 Likes

Ok, Many Thanks.