Since setDefault works on the current process, that should function correctly. The only thing you can't do is change the locale of other applications.