Multilanguage

[quote=169089:@Markus Winter]
It uses default when it can’t find any of the other languages in your preferred languages list. As German is in your list it uses that when it doesn’t find English.[/quote]
Well …
On OS X it embeds the CURRENT language in use as the DEVELOPMENT language & falls back to that when there isn’t one in the users list that matches
You can see this key written in the OS X plist

On Windows & Linux it has no such fallback mechanism - it either matches or uses default

Windows should grab the language when the app is launched as far as I recall (but I’m not 100% sure)
There are a couple places in Windows where you can set “language” and I dont know which of them is used off the top of my head

Thanks Norman, but my question was more about trying out different languages. On the Mac I just change the setting and restart the app, not the system. How is it on Windows? My Windows system is not multi-lingual so I can’t try.

Heh … yeah Windows is much harder to try multiple languages

And since I’m NOT the windows expert I’ll leave it there rather than be completely wrong

I have Windows set up mostly in English and then one VM in French and one in traditional Chinese
None are multilingual

At the moment it works like this…

Default = English
German = German

If i build the app with osx in english the automatically switch is working.

This Default thing is a wrong name for me…
If i read this default is the default language text for me…except an other language is filled and was detected.

What is happening if i use english instead of default and the osx from a user is now spanish…then the app should be english not german.

What did you mean with this? I cant move the languages…btw i dont know how?

But it has detected another suitable language. In your Mac OS X language settings you have set German as one of your languages.

Default is for when it does not detect ANY suitable languages.

If you run it on a Spanish system (with maybe French and Chinese language specified in the OS as other usable languages) then it will use what is written in default.

First add an ENGLISH localisation to your project.

To use a language on OS X you add it to the preferred languages in the Language & Region system preferences panel. You can change the order of languages by dragging them up or down in the list. To make a language the primary language you simply drag it to the top.

Ok then the correct way would be like this

1st English
2nd German

and for all other languages he could not find, he will fallback to english?

(that drag n drop dont work on my mac, cant move them)

[quote=169118:@Sascha Mierke]At the moment it works like this…

Default = English
German = German

If i build the app with osx in english the automatically switch is working.

This Default thing is a wrong name for me…
If i read this default is the default language text for me…except an other language is filled and was detected.

What is happening if i use english instead of default and the osx from a user is now spanish…then the app should be english not german.[/quote]

IF you switched your language to German then “Default” = German and folks would only see German as there would be no english strings
“Default” literally means “whatever language the person who compiled the app was using when he compiled it”
It’s not a specific language at all

http://www.xojo.com/blog/en/2013/12/how-os-x-chooses-a-language.php
http://www.realsoftwareblog.com/2011/06/avoid-default-language.html

[quote=169141:@Sascha Mierke]Ok then the correct way would be like this

1st English
2nd German

and for all other languages he could not find, he will fallback to english?

(that drag n drop dont work on my mac, cant move them)[/quote]
Es geht um ZWEI verschiedene Sachen.

  1. Das System. “Language & Region system preferences panel”

Beim Installieren des Systems legt jeder User fest welche Sprache seine Hauptsprache ist.

Um weitere Sprachen zu aktivieren geht er in den Systemeinstellungen zu “Sprache und Ländereinstellungen”. Dort legt jeder User für sich fest welche Sprachen er noch versteht, und in welcher Reihenfolge. zB. Deutsch ist meine Hauptsprache, Englisch versteh ich, Italienisch ein bisschen.

Die Reihenfolge legst du fest indem du die Sprachen hoch oder runterziehst.

Nochmal: DAS IST DAS OPERATIONSSYSTEM MAC OS X.

  1. Die App.

Eine App wird lokalisiert, dh. du fügst verschiedene Sprachen hinzu. Zum Beispiel Englisch, Deutsch, Spanisch. Und für alle anderen Fälle einen “Default” der meist in Englisch ist weil das die meisten User verstehen.

DER COMPUTER WEIß NICHT IN WELCHER SPRACHE DEIN DEFAULT IST. Für den Computer ist das der Default, aber er kann nicht sagen ob du da Englisch oder Klingonisch reingeschrieben hast.

Wenn du keine Englische Sprache hinzufügst (und der Default gilt nicht, selbst wenn er du da Englisch schreibst) dann hast du auch keine Englische Lokalisation.

  1. App auf verschiedenen Computern.

Wenn die App jetzt auf dem System von 1) läuft dann sieht sie die bevorzugte Sprache ist Deutsch. Aha, hab ich. Also zeig ich alles in Deutsch.

Wenn die App jetzt auf einem Chinesischen System läuft mit Koreanisch und Japanisch als weiteren Sprachen, dann sagt sie: Huch! Chinesisch kann ich nicht. Welch anderen Sprachen versteht der User? Huch, Koreanisch kann ich auch nicht. Huch, Japanisch kann ich auch nicht. Da bleibt mir nur übrig zu nehmen was in Default steht und hoffen daß der User das versteht.

DEFAULT IST KEINE SPRACHE sondern was der Computer nimmt wenn keine Sprache festgelegt ist. Was du als Default ausfüllst bleibt dir überlassen.

Ich lieg falsch. Benutz Default am Besten gar nicht.

Honestly I never ever implement localisation this way! I always allow the user to choose their localisation settings independent of the OS, if they wish. This is the result of 25 years of writing software for Swiss clients - where they seem to have every strange configuration under the sun - the usual is that their machine is configured one way, but they want to have your app in another language. But at the same time they can’t configure the machine to use the other settings, either because they are not allowed or else some other package they need to use will not work…

So I have taken the path of least resistance and always make it configurable independent of the OS settings. I pick up the default based on their current settings, but if they change it to some other preference that is what I will use.

[quote=169177:@James Dooley]Honestly I never ever implement localisation this way! I always allow the user to choose their localisation settings independent of the OS, if they wish. This is the result of 25 years of writing software for Swiss clients - where they seem to have every strange configuration under the sun - the usual is that their machine is configured one way, but they want to have your app in another language. But at the same time they can’t configure the machine to use the other settings, either because they are not allowed or else some other package they need to use will not work…

So I have taken the path of least resistance and always make it configurable independent of the OS settings. I pick up the default based on their current settings, but if they change it to some other preference that is what I will use.[/quote]

@James Dooley how do you force the app to be a particular language if you are not using the OS settings? if my MBP is set to American (err I mean English) and want my app to be in Espanol (Spanish), unless I have something that tells the app that my language is spanish, it will come up in english. It seems you have been working on this for years, so I want to learn from your experiences.

thanks

What I posted was just “how OS X expects you to use what facilities it provides” and how you use that from Xojo

There are other ways to use those facilities or invent your own
Certainly your users expectations dictate what you need to do

On OS X its tougher to force an app to run in a specific language AND use the OS facilities.

The easiest is to write your own mechanism that does about what Apples tool does.
A sqlite table with “key”, “language code” and “value” is about all you need.
If you open one of apples localized file you’ll see they are very simple.

The issue is then you have to put in the code to get the right display string into every control, menu item, etc and some aspects of the OS provided items (apple menu items etc) will still be in what ever language the user is running

[quote=169179:@scott boss]@James Dooley how do you force the app to be a particular language if you are not using the OS settings? if my MBP is set to American (err I mean English) and want my app to be in Espanol (Spanish), unless I have something that tells the app that my language is spanish, it will come up in english. It seems you have been working on this for years, so I want to learn from your experiences.

thanks[/quote]
If you use the applescript I posted above, then you can do exactly this: switch your app to one of the other implemented languages, despite of the OS having another language set.

In one of my apps it looks like this:

Ok…now im confused.

It looks like this:

What happens now if the app is started on a system that knows only french? Will it fall to english or german?

Neither. It falls back to the default value that is defined in the inspector on the right (not visible in your screen shot). Based on your image it looks like you haven’t put anything in that field at all.

Me too.