Language resets itself to "default"

So I learned a while ago that “default” as language isn’t good. But why does the language reset itself to this value? I know that I changed every project of mine to english. Today I see - again - “default”.

Xojo 2018r3, High Sierra.

Did you download that Xojo 2018r3 from Xojo (or “” or elsewhere) ?

I too have Default in my French running OS’ (El Capitan) Xojo (both 2015r1 and 2018r4).

I do not noticed that before, but I too have “Support HiDPI” when running on my Retina MacBook Pro… :wink:

[quote=422797:@Beatrix Willius]So I learned a while ago that “default” as language isn’t good. But why does the language reset itself to this value? I know that I changed every project of mine to english. Today I see - again - “default”.

Xojo 2018r3, High Sierra.[/quote]
Does it happen immediately if you were to change it, save, then close and reopen the project?

@Tim Parnell: nope, that would be too easy, wouldn’t it?

Within a couple of minutes working with the main project the language is back to default. Did a build, a debug run, checked some code.

So it happens while you’re using the IDE? That’s scary.

What version of Xojo or is it in any version?

I’m working on an app that I set the language to Spanish. My Mac is set to English. I just opened it and still report the language as Spanish. Xojo 2018r3

Currently, I’m using Xojo 2018r3 on High Sierra and Mojave. I’m sure I have had this with 2018r1, too. Macs are set to German.

I have 7 main projects from a one liner to 90 klocs. The older projects are in rbp format (3), the newer ones are in xml. The move from rbp to xml has been on the to-do list since about forever because of the complex build procedure (helper app goes into main app which goes into installer).

(Just guessing) Do you have build scripts?

Yes, lots of build scripts. None of those manipulates the language - I think.

A user just told me that even on a German macOS the language of the app is English. Blech!

Converted the main project for testing to xml and had a look:


I have a feeling that building might inadvertently cause a change to language. It doesn’t seem like it should, but I wouldn’t be shocked anymore.

@Tim Parnell: yes, that would be my guess, too. I find it just too odd that nobody else seems to have such a problem.

How does an application know which localisation to load?

In the plist I see “Localization native development region”. When I build with “default” language in Xojo I get as value for this plist entry “de”. If I manually change the value to “en” then everything is in english. If I peek at another app - like Kindle - there also is “en” as value but I get the app in German.

I can live with anything besides my app starting in German for everyone.

This is all I can really offer you,
From what I understand (forum posts), localization in Xojo isn’t straightforward. The projects I’ve worked on that handle localization were localized before they reached me.

These blog posts might help as far as macOS is concerned:

Note that the Application is not in charge about which language is shown - the user is. If your application is localized into many languages the user will see which ever localization you have provided that is nearest the top of their list in System Preferences > Language & Region. And if there are no matches then they will see whatever language is in the development region setting as the very last alternative.

@Jason Parsley : the original topic of the discussion was the language field in the IDE which resets ITSELF back to default after I changed it to english. Can you comment on this?

I can’t say I’ve ever seen this occur and there doesn’t seem to be any existing bug reports about this. Do you have any prebuild scripts that might be altering the language?
I had Norm check sources and unless it’s a build script or a manual change to the popup there’s no code that would alter this by just running a project.

You need to make sure your English text is in an English localisation, German in German etc.

In the IDE you see Default localisation as standard. If you change the language in the build settings you then see that language in the window editor / menu editor etc of the IDE. I don’t thin kit makes a difference to how the app behaves when built.

I just did a quick test:

Create a constant called Message, add a Default text, English and German text.
Create a label and assigned the constant #Message to it.

Running the app within the IDE with the Mac set to English I got the English message.
Running the app within the IDE with the Mac set to German I got the German message.

Setting the language to a given locale didn’t make any difference to how it showed in the running application. The same was true of a built application.

The build settings language setting only seems to affect how the application is shown in the IDE.

The Build Setting value is used at design and run time. Please see my previous post & the blog entries they refer to to see how it’s used.

Neither of the blog posts mentions the Build Settings - Language setting.

For macOS the build setting is the Development Region which is the very last fallback that will be used if there are no matches between the users list of languages and the localizations you have provided.