Localisation

As far as I know you can use Default instead of English for the language selection.
You have now, Any, English, EnglishValue
That should be changed in Any, Default, EnglishValue.
After that English will be the default language.

Define in the Build Settings - Shared - Language: English. You are now using default

[quote=305247:@Richard Grafl]
But wouldn’t this mean that someone with language e.g. french gets the german version instead of the english one?[/quote]
No

On OS X they would get whatever language they had set higher in the list of languages
If they had set their language list to
French
English
German

they would get English because there is no setting in the app for French, but there is one for English and its earlier in the System localization list

If they had set their language list to
French
German
English

they would get German because there is no setting in the app for French, but there is one for German and its earlier in the System localization list

I’ll have to double check theWindows & Linux behaviour as I dont recall it off the top of my head as its not exactly the same

[quote=305263:@Paul Sondervan]As far as I know you can use Default instead of English for the language selection.
You have now, Any, English, EnglishValue
That should be changed in Any, Default, EnglishValue.
After that English will be the default language.[/quote]

NO
DEFAULT is NOT ENGLISH !!!
DEFAULT literally means “whatever language the computer that compiles this project is running”

If I compile a project FOR ME “DEFAULT = English”
If I give that exact project to Stephane and he compiles it with NO CHANGES “DEFAULT = French” because he runs OS X in French

IF you use “Default” you should set values for EVERY language you expect to support in the editor

See
http://blog.xojo.com/2014/03/05/picking-a-language-at-runtime/
http://blog.xojo.com/2013/12/17/how-os-x-chooses-a-language/

This means means you’re using ENGLISH as the BUILD LANGUAGE
This does mean that a constants DEFAULT VALUE will be treated as if it were the English one
But you can still override it if you set one for English specifically in the editor

http://www.realsoftwareblog.com/2011/06/avoid-default-language.html

[quote=305277:@Norman Palardy]NO
DEFAULT is NOT ENGLISH !!!
DEFAULT literally means “whatever language the computer that compiles this project is running”

If I compile a project FOR ME “DEFAULT = English”
If I give that exact project to Stephane and he compiles it with NO CHANGES “DEFAULT = French” because he runs OS X in French[/quote]
Sorry, you are so right
:blush:

This whole thread is getting more obscure by the hour.

OK. So when I build on my English system, Default is English, Right ?

So if someone has a French system he will see French, and Spanish Spanish, because I coded them as so.

Now, if someone is running my app on an Italian system, he will see English because it is default, right ?

I think Thomas even created a case for “Default language should die” or something like that

[quote=305294:@Michel Bujardet]OK. So when I build on my English system, Default is English, Right ?
So if someone has a French system he will see French, and Spanish Spanish, because I coded them as so.
[/quote]
YES IF

  • you selected “DEFAULT” in Shared > Build > Language and you are running in English
  • OR you selected “English” in Shared > Build > Language

NO
see How OS X Chooses a Language – Xojo Programming Blog

He will see which ever of the languages you support is closer to the top of the list of his preferred languages on OS X
Windows & Linux are a little different as they do not do language fallback like OS X does - I just havent looked at the code to see what exactly they will do

DEFAULT only comes into play if there is NO match between the languages you listed for dynamic constants and a users language settings

Suppose you write an app and it supports English, French, German
And a user in Japan uses it and ONLY has Japanese in their list of languages
Whatever DEFAULT is will be what they will see (see above for how “DEFAULT” is determined AT COMPILE TIME)

In my case my whole app is in german.
Now I want to translate it to english via Lingua.
Anyone who has not german as OS language should see it in english.
So what do I have to set as language in the build settings and how should i use my constants?
Do I have to set the default value of the constants to the english value?
If so this would not work for me because the default value can not bet set in Lingua.

Any ideas?

[quote=308929:@Richard Grafl]In my case my whole app is in german.
Now I want to translate it to english via Lingua.
Anyone who has not german as OS language should see it in english.
So what do I have to set as language in the build settings and how should i use my constants?
Do I have to set the default value of the constants to the english value?
If so this would not work for me because the default value can not bet set in Lingua.[/quote]

You cant alter “default” in Lingua

If you want to insure that a user see’s English set you app’s build language to be English
And make sure your string constants are set to be DYNAMIC and add an English value to them all
And you’re done as far as what you CAN control
The rest is then determined by user settings

Please see sample project.

I set the language in the build settings to english.
My constant is dynamic and it has values for english an german and NO default value.

So everyone with OS language german sees the german value and anyone else (OS language english, french, spanish etc.) sees the english value?

Thanks

Depends on the OS
http://blog.xojo.com/2013/12/17/how-os-x-chooses-a-language/

So OS X uses the first match it finds and if there is no match it uses the language which is set in the build settings of my app?
As only 5 % of our customers use OS X I’m more concerned about Windows.
Does Windows with french as language also use the language which is set in the build settings if there is no french localization?

The good news is that our framework implements this same scheme so behaviour between OS X and Windows is similar

I just set up a PC with french Windows 10 OS just to check this all.

Language in build settings is set to english.
German OS (localization in the constants given) --> OK
English OS (localization in the constants given) --> OK
French OS (localization NOT given - should use english) --> NOT OK (default value of the constant is used)

So with french OS it uses the default value of the constants but it should use english.
How can I achieve this?

It should fallback to the build language but since it isn’t set the popup for your English localized values to be “default”
That should make “english” the default (which is kind of what setting build language should do)

And FWIW i’d file a bug report about the fallback to build language not working

<https://xojo.com/issue/46657>