Localizied Strings default Text witch is used, whats the difference?

What is the different between the Inspector Default Value and the Editor Default Value?

Xojo1

Xojo2

Ahh, LightON,

I think I know it:

Is there no Result for Plattform/Language, the default Value from Inspector-Default is used, I think so…

LightOff

Yes.

What you never ever must do is to set the language of the build settings to default. Because that will pick the language of the computer as language of the app. The reason for that never made sense to me. I even have an error message when building the app when default is selected.

if you have an app in shop the user will see his own language
and if it is not translated by us he will see the default constant value.

i remember
if you compile with language english the exe is english only.
if you compile with language german the exe is german only.
and at all it was not possible to choose the language in app start.
if me testing the app from ide in two languages i have to changes windows region, logout, login and start the ide & project.

If you set the language to default and the computer is on German language then the users will see the German language. Been there, done that, got the t-shirt.

OT

Das habe ich verstanden als lass es niemals auf Language default.
Und ich wollte damit sagen das es sehr wohl Sinn macht das auf default zu lassen.

Das passiert bei Language = english mit konstanten die Default Englisch sind
(aber ins Deutsche übersetzt wurden).
Wenn ich das aus der IDE starte sehe ich deutsch was ich gar nicht will.
Ist alles ein bischen kuddel muddel in Xojo.

In the same way, I asked a question in this thread: Localization in IDE strange things General
The IDE show the menu (and the windows buttons etc.) in English for one application and in the default value for the other. The two applications have the same settings.

I think i’ve got it.

The Build setting “Language” ist important if I share Projekt Files with others because if I use on my Laptop English as System Language and on my PC German is the Default Language different and confusing me. (I have learned this in 2 hours :hot_face:)

The Build Setting has no effect of the Language exe, the exe run allways with the System Language selected in the System.

I think the best way for localication is:
Define a Default in the Inspector pane, not in the localisised String (This one is used if no localisation is aviable)
Define no Default in the localisised String
Define the other Lanugage Strings

If you wish for testing to run the IDE with German, select in the Build Settings German
for english testing in the IDE, select in the Build Settings english. But if you start the debugger, all Text are in System Language.

The exe runs allways in the System Language.

I’ve tested this too, with Win 10 only select Region in the System Settings, no logout/login requierd for me.

I’ve tested this, my APPs running allways in the system language. (2021R3)

Thank you all!

behavior in screenshots

os german
OS Deutsch

compile settings
Ashampoo_Snap_Sonntag, 20. Februar 2022_8h0m44s_001_Xojo - Test

constant default english (primary language for users)

ide preview ok

run from ide wrong

exe wrong
Ashampoo_Snap_Sonntag, 20. Februar 2022_8h5m26s_001_Untitled

i speak german and have a few apps for primary english users.
if they speak german they should see german.
Turkish users will see english because its not translated.

I know, why this confusing me :zipper_mouth_face:

Build setting OS ssetting IDE Editor Debugger Exe
English English English English English
German English German English English
English German English German German
German German German German German
Default German German German German
Default English English English English
1 Like

It can be confusing but there is a logic.
The base case is a real constant:
kNoTranslation will be rendered as “No Translation” in any case
And this value will be used also if you set to false the flag Localized.

If the constant is Localized you can add local translation.
Let’s add an “unreachable” translation (IE you picked the wrong item). In this case the “DefaultValue” will be used.

IF (and I repeat IF) you add the language “Default” then you will see this one

obviously if you add the value for the a right language then the running app will show the right translation with right OS setting.

The shared language setting, will let you see the UI with a specific language in the IDE (for build as said before better set it to Default, this is a Standard Pre Build Script in my apps)

3 Likes

theoretical maybe, practice it looks like the table that jürgen shows.
my requirement is german os, creating,design and test an english app from ide.
and because i am german i translated it to german in case someone have a
windows with german user enviroment.
if me want test a final exe in english for release i have to change windows region.
there is no way to use App.Language = “EN” or “DE” after start. (at least by my knowledge)

That’s normal since the user expects it to be on “German” as the computer is set to that…

Default in the Build Settings is just saying “Use my compter language if possible”.
If there is no language constant but there is a default then that will be used instead.

My way for international apps is now:

This default value is important for lingua
Xojo1
If i forgot to translate, the default Value is used.

This are the translated settings
Xojo2

All German app-users see the language in German, Swedish users see this in swedish, all other useres see this in english per Default.

In the Build settings i use “German”. All controls have now German Language.

I’ve found no way to edit the Default Language in lingua, becaus i’m not be able export the defaults (Any Default “English Text”)

Use English or all users will start with German.

There is an app called Arbed from Thomas Tempelmann. It has a script to change the default values.

Sure? I had testet this, the Build Setting of the language has no effect to the exe. The exe runs with the language from the OS Settings… see my table above.

Oje, ich dachte ich habs endlich kapiert :nauseated_face:

Or… program like a pig !

In a small utility with very few strings, I add a bunch of flags (Spanish, English, Italian, German and French) and a simple click change the language instantly (for the whole utility; 3 or more windows + Preferences; language saved / restored to / from disk).

it would be so easy if we had a Multilingual String Textbox for Properties.

This is not true is it? If you use Default in the App build settings all users see their default language if you have defined those. if you have no constant value for the system language it will use the default dynamic constant value.

In lingua you can change the “default” (from build settings) since they are ‘your’ current system language, but you are required to have it defined in the dynamic constants.

From: https://documentation.xojo.com/topics/localizing_your_apps/introduction_to_app_localization.html

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.

For example, if you leave both the localized string language and build language as “Default” then “Default” becomes “English” for users that build with an English system and becomes “French” for users that build with a French system.