App started with wrong localisation

Now and then I got reports about my application being started with the wrong localization. I never was able to reproduce the problem. This week I released a new version and got again some reports about a wrong localisation. My app is localized in English and German. It seems that on non-English and non-German systems the app is started in German. Today I was finally able to reproduce the problem. The below screenshot shows the macOS in french and my app is in German

What am I doing fundamentally stupid to get such a problem? The language in my projects is set to Default. I’m using the usual dynamic constants for localisation.

Xojo 2017r1, 32bit, different versions of macOS.

Had similar issues in the past and simply changed the Language in my Projects to “English”. :wink:

Thanks, Sascha. I’ll try english default language.

64bit seems to be working better. At least here on the french macOS. I get almost everything in German. Except “Quitter M…” and some other menu items.

The LangRef say’s: [quote]It is important that you select a specific language in this build setting. If you also leave this setting at “Default”, you will run into confusion if the project file is shared with people that do not have the same system language as you.[/quote]

Just setting it to english and providing english translations in the Default Constant Value plus additional Values for various other languages, always worked fine for my customers.

This is supposed to make sense? Gr… Thanks!

Now only the problem with the menus is left but I’ll leave that for another day.

Uh oh. I have a feature to change the language

dim theShell as new Shell theShell.Execute "defaults write " + BundleID + " AppleLanguages '(" + me.Text + ")'" if theShell.ErrorCode = 0 then Return else globals.theErrorLog.DialogErrorProceed kErrorLanguage + " " + theShell.Result end if

After changing the language to english there is an error when executing the above code: Rep argument is not a dictionary. Defaults have not been changed. I need to change the language now and then to make screenshots for users. I don’t know if any user uses the feature.

For this i use Açana App Language

Providing “Default” with lyrics in English, plus “English” constants as well, preferably with the same text strings content as “Default”?
Me, not tried yet, but if it works, it’s worth to do that work.

No, just “Default” and additional non-english Strings. :slight_smile:

This blog post should help:

http://www.realsoftwareblog.com/2011/06/avoid-default-language.html

I recommend never using default.

Specifically, pick english as the build language because choosing “default” will mean the OS still thinks your app should, when all else fails, be in german if you compile on a german OS (or japanese if you compile in a japanese OS, or french if you compile on a french OS).

If you want your app to appear in a specific language when the end user does not have one of the localizations you support in their list of preferred languages then you should set that language in the shared build settings.

How about a warning when default language is used for compiling…

Then the next step would be to deprecate "Default"…

Thoughts about this?

[quote=393137:@Thomas Eckert]How about a warning when default language is used for compiling…

Then the next step would be to deprecate "Default"…

Thoughts about this?[/quote]

There is a feature request about “default” here:

<https://xojo.com/issue/17070>

[quote=393134:@Jason Parsley]Specifically, pick english as the build language because choosing “default” will mean the OS still thinks your app should, when all else fails, be in german if you compile on a german OS (or japanese if you compile in a japanese OS, or french if you compile on a french OS).

If you want your app to appear in a specific language when the end user does not have one of the localizations you support in their list of preferred languages then you should set that language in the shared build settings.[/quote]
Thanks, already done a while ago after following forum threads regarding this problem.