localization - Do the contents of java.lang.System.properties change with locale? -
i'm not used having take i18n stuff account. wrote method java program:
boolean iswindows() { return system.getproperty("os.name").tolowercase().contains("windows"); }
i need check in order provide workaround windows-specific jvm bug.
it occurred me program may need run on systems not have english chosen language, going cause line of code break?
maybe should clarify asked hoping see proof people dredge (so feel better letting code out wild). answers links documentation, experimental evidence, or kind of supporting rationale preference.
let me straight, wondering whether os name (as returned os.name
property) might internationalized , contain word windows in other language?
i 99% won't microsoft windows trademark (or whatever, ianal) , not translated , left as-is. however, looked up definition of is_os_windows
property in apache commons lang systemutils class. after removing layers of indirection boils down to:
system.getproperty("os.name").startswith("windows");
i not claiming proof, tend believe in such established libraries.
Comments
Post a Comment