Community
Participate
Working Groups
We need to be able to determine if the user set thier locale using the -nl command line parameter or if it was determined by querying the default Locale. I am happy with a system property (e.g. "osgi.nl.user") if you want to do it that way so as not to change any current behaviour.
Given the nature of the initial problem that we are trying to fix, a very low disturbance fix has been implemented. The osgi.nl.user is set to the osgi.nl value if one of -nl or osgi.nl.user has been specified. The fix is made in EnvironmentInfo.java.
How does this handle the case where the user does -Dosgi.nl or puts it in their config.ini file (where I would expect an installer to write it)
Every case is handled in the EnvironmentInfo#setupSystemContext().
This API is not public.
The code for the fix is in #setupSystemContext, but the fix itself consists in setting the osgi.nl.user property. See comment #1.
So what public API can I use to get this value?
java.lang.System.getProperty("osgi.nl.user")