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

Exactly as expected… maybe the understanding is wrong or unclear ?
This is only an issue if you have translated constants and are using the build settings “Default”. But then you should already know how to use this. Maybe xojo could add an triangle (!) and a tooltip to the build setting if you have one or more dynamic constants with different language values but the setting is to “Default”

No, at least on the Mac if you use default then the users will get the language that was used for building.

1 Like

so mac and windows behave different. thats a clarification.

That sounds like a bug.

This is true, but you can access a specific language of a localized constant if you pass the language code in parenthesis.
E. g. TextModule.kLocalizedConstant(”DE”).
This works also with a variable and in the menu editor. So it‘s possible to let the user choose a language, independet from the OS.

Var myDeString As String = YourDynamicConst("de")

You can do that for a long time…

sure, show me the same with listbox headers setup in ide :wink:
in menus we usually set only a constant.
same for window title or other properties.
it can only be solved if you replace everything if the window opens.

what i need is a place where i can set the used language.
just because i am german and will see english.
or a german user using a english enviroment server.
xojo multilingualism is thought-out half.

really?
as example menu about have a constand kAbout
kAbout(LanguageAfterStart)
how could i add placeholder for the language?

add:

#kAbout("de")

in the ide value Should work

i do not want a fix value like “de”
i will change the lange in app start because the language from os it not always
correct.
just think about a shared pc account. this is still common in companys.
the user will see his language what he can speak best.
this multicultural staff share also one app.
instead of this constants a method call at runtime would be better.
xojo assume that os user account language is always that language for the user in front. that is not realistic.
it is uncommon to compile a exe for each language.

my need is
App.Language =“de”
Hallo=#kHello
App.Language =“en”
Hello=#kHello
for a multi constant that is used in menus,properties,listbox headers,…

Set a module’s variable LangSupport.UserLang = "DE". In the menu editor type #kAbout(LangSupport.UserLang).
Sadly you can’t use this in other controls like Listboxes, Buttons etc. You have code it like Button.Caption = #kButtonCaption(LangSupport.UserLang).

2 Likes

If it wasn’t covered above - I might have missed it - How do you size things in your design so they accommodate the string widths for titles/labels/headings/etc.

Do you create a list of expected languages and then just test your controls by changing the system default language to each one - making sure they will all fit?

In other words - no special magic - just try and see?

Yes. When designing a new window I copy the longest translation into the control. For final checking I have 2 menu items that are invisible to the user to show all windows and all sheets.