In code you don’t need the #, in IDE inspector you do.
In terms of why it doesn’t show it could be a mismatch in locale. Xojo uses names, rather than codes it could be your Interface it pt-br but Xojo is expecting something else by Portuguese Brazil.
All I can think of is that there could be a problem with the remote debugger choosing the right language. You could try building the app and transferring it manually, see if that solves the problem.
Odd that the identifier on Windows comes out as ‘pt_BR@calendar=gregorian;currency=brl;fw=…’ and on Mac just ‘en_BR’. I don’t have a windows machine to try it on.
Ah, I didn’t realise that was what it was showing. All that stuff seems wrong, as I said. If Xojo doesn’t match the language then it uses the Default language. Which is defined on the Shared Build settings. as a work around you could change that to do testing.
You are best adding a but report. I don’t work for Xojo. You are best to create a small working example project. Just create a new project and copy your constant and label into it. Check it still fails, if so attach it to your report. Attach your screen shots showing the locale output.
If it works then you need to figure out what’s different with your app.
You could try adding a new user to the windows machine, set the setting correctly and see if the problem persists.
According to Xojo docs Identifier is supposed to just be the “pt_BR” part. Which either means that there is a bug is Xojo that isn’t reading it correctly. Or Windows is, for some reason, returning the wrong thing.
Keep in mind that the info you get from Locale is probably not the same as what’s used for Constants. I would create a constant that includes all of the languages that you support as well as the once’s that are close whose text value is also the name of the language and put it in a simple little project and run that. You may find that xojos language constant is revealing something else on windows.
If you change to only Portuguese, it behaves the same?
If you change the Build settings Language from ‘Default’ to ‘English’ does your app behave the same?
Just testet on Windows 11: Xojo is using “Portugese” instead of “Portugese Brazil” for the language constant, if the Windows language is on “Portugese Brazil”. If this is a bug, it may be easily fixed.