Localisation not working on Mac

With default value empty, it still shows English labels. Does that mean that the macOS primary language setting overrides the explicit language setting in ‘Build’ at runtime?

Don’t ever use the default value. There are reasons for default that I never got. Set the language to english. I even said so above.

If your system is set to english why do you expect german labels?

Some users have their desktop set to German and expect a UI in that language. I want to check how it looks like and make sure that all objects are wide enough for display of labels in German. This is what I want to achieve. My assumption that the ‘language’ build directive would force German labels is obviously wrong.
How can I get this done in Xojo without switching the system language?

yes it says "i prefer to use… " (build settings).

But if the system/OS language is defined in the constant you’ll see that one.

i think you could do

Var myLangString As String = MY_LOCALIZED_CONST("de") // returns the GERMAN string (if defined)
1 Like

The language in the build settings defines the language for the default value of a constant. I always use the default value for „en-us“ because that‘s the language that is used if the user‘s system language is not supported. This has always worked w/o problems for me.

1 Like

I strongly recommend to test with the system language setting. Localization not only affects your text but also date, time and number formats.

1 Like

You can only change the language of single apps in the apps area:

Available since Crapolina? Otherwise use Acana App Language or something similar to change only the app.

2 Likes

Thank you, @DerkJ, this works fine!

1 Like

The most obvious one I did not see…
Thank you, @Beatrix_Willius!

1 Like

You are right, for a full test, the app must be tested against a proper system setting.