I’m learning/testing the localization features and the differences between macOS and Windows.
After a lot of tests I found out that:
- on macOS if I build with Language Spanish, I get the Save Dialog in Spanish even if the computer is in English (no dynamic constants used)
- on Windows the same build will display the language it is running
- there is a case <https://xojo.com/issue/49505> and it looks like some strings are missing
What I don’t understand is why Xojo needs to ship Localizable.strings inside the framework when they (some?) are handled within macOS. For example, create a new project and use this code:
Dim f As FolderItem
f = GetSaveFolderItem("", "test")
Then change build language to Spanish and run the project. Expand the save window (by clicking the button on the right side of “Guardar como:”), you can see every button/label in Spanish even when they are missing from Localizable.strings, like “New Folder” (Nueva carpeta), “Save As:” (Guardar como), “Tags:” (Etiquetas), “Hide extension” (Ocultar extensin).
So, if this dialog can change everything from English to Spanish even if the strings are not in Localizable.strings, then why the need to supply that file for MessageDialog strings (case 49505) or other values, can’t you let the OS handle that?
Notes:
From my tests, on Windows, it doesn’t matter if you compile with Language Spanish or English, the MsgBox and Save dialog will show the language your windows is using as the main one.
One tip, if you want your app on macOS to have the same behavior as in windows (MsgBox and Dialog in OS language) then you just need to add a localizable variable to your project with the languages you want, even if you don’t use the variable. For example, you created a project above that change the Save dialog to Spanish or English when you change the Build Language. Now create App.Constat kTest, type Text, Scope protected, Dynamic On, add language English, value test, Spanish, value test and run your project again. Your save dialog will be in the language your mac is set as default language no matter if you build language English or build language Spanish.
I hope this is clear.