Running localized app in debugger

Normally, my computer language is set to English. Now I’m dabbling with localization I want to see the result of my hard work in the debugger. I’ve set my computer language to German. In the build settings the language also is set to German. But when running in the debugger the language is still English.

Am I doing something wrong? Is this a bug or a feature?

Mac OS 10.10.2, Xojo 2015r1.

the localization is defined by system settings.
So go to language in system preferences and switch to German.

Shouldn’t that be enough? I can see the value of the dynamic constants even without compiling in the IDE. But the menus are stubborn. Got the same for the example “Eddies electronics”. Even for the compiled app I need to set the language explicitly to German with LangSwitch.

Sorry, I missed that.

Are those text constants localized and dynamic?
because I think the language setting is ignored for dynamic constants and they load dynamic.

I just tried that in 2016R2 Windows. Dynamic constants are taken into account in the IDE. For instance if I select Spanish, it shows in the IDE. But not in the run.

It is nice to see if language inflation does not pose problem for design, though.

[quote=174599:@Beatrix Willius]Normally, my computer language is set to English. Now I’m dabbling with localization I want to see the result of my hard work in the debugger. I’ve set my computer language to German. In the build settings the language also is set to German. But when running in the debugger the language is still English.

Am I doing something wrong? Is this a bug or a feature?

Mac OS 10.10.2, Xojo 2015r1.[/quote]

I assume you just dragged German to the top of the list of available languages
Then run

Here … like this

Neat video, Norman. Years ago I needed a way to change the language of my running app on the fly (without changing the OS language, and without restarting the app). Has any work been done on Xojo’s capabilities there, or is it still completely reliant on the OS to tell it what language to run in?

TLDR; Can I change the language in my app without restarting it or changing OS language?
<https://xojo.com/issue/16936>

Norman posted something in https://forum.xojo.com/6020-overriding-system-language/0

I have to admit not understanding fully how it works.

Basically you just ask the runtime for the localized value in a specific language
Thats what that little example demonstrates

Whats NOT automatic is a way to do this for every control in your app

[quote=277956:@Kimball Larsen]Neat video, Norman. Years ago I needed a way to change the language of my running app on the fly (without changing the OS language, and without restarting the app). Has any work been done on Xojo’s capabilities there, or is it still completely reliant on the OS to tell it what language to run in?
[/quote]
OS as thats “default” and normal behaviour
Anything outside that you get to code

[quote=277956:@Kimball Larsen]Can I change the language in my app without restarting it or changing OS language?
<https://xojo.com/issue/16936>[/quote]
Yes YOU can - but then you always could with a little inventiveness.
Those examples are just a simple demo of a way to do it at runtime

We needed a way to get the right localized value at runtime for WebEdition
Since the server’ language is irrelevant we had to be able to ask the framework for the localized string given the language code of the client connecting
So this post dates your request I think

For Mac there is Language Switcher I use regularly.

Not the same.
Kimball wants to change languages while the app is running.
Thats not actually supported by Xojo apps - or the underlying OS X API’s.
Nor is it supported by our framework functions that handle dynamic constants on Linux & Windows.

You could always do this in your own code you just had to write it.

I suspect it’s never made it up the “must implement” list because it’s unusual for a desktop app to do this.
So if we implemented this it would be a feature for a small niche of users.
And there are much bigger fish to fry

Indeed.

I change the language of the application “on the fly”, but I have to do it with my own code.
And I don’t thing this is something to be implemented by Xojo. It is not common and sometimes I think it is not even necessary. But I had it this way since many years ago, and I continued it.

@Horst Jehle has a nice App for language switching too: https://forum.xojo.com/conversation/post/197744

I’m now using a simple dropdown menu with values default, en and de. On changing it the following code is executed:

dim theShell as new Shell theShell.Execute "defaults write " + BundleID + " AppleLanguages '(" + me.Text + ")'"

I still need to restart the app.

In the “build settings => Debug => Command Line Arguments” add this

For English language and locale US:
–args -AppleLanguages “(en)” -AppleLocale en-US

For Portuguese language and locale Brazil:
–args -AppleLanguages “(pt)” -AppleLocale pt-BR

this has bite me in the backside more than once.

[quote=278036:@Beatrix Willius]I’m now using a simple dropdown menu with values default, en and de. On changing it the following code is executed:

dim theShell as new Shell theShell.Execute "defaults write " + BundleID + " AppleLanguages '(" + me.Text + ")'"

I still need to restart the app.[/quote]

Yes
Language is basically set at app start up and never rechecked