Closed bgaillard closed 7 years ago
After reflexion I think my implementation is perhaps a little "brittle".
Perhaps it would be better to add an --os-language
parameter which would accept an ISO 639-1 code.
For example.
check-windows-disk.rb -w 85 -c 95 --os-language FR
What do you think about that ?
I think passing in the language would work well. Or is there an environment variable or other command that could be used to determine the language setting?
@bgaillard any plans to circle back to this?
@eheydrick From what I googled (exists as far back as XP) and validated (at home on windows 10) we could get it from systeminfo.exe
which returned something like this:
PS C:\Users\majormoses> systeminfo.exe | findstr "Locale"
System Locale: en-us;English (United States)
Input Locale: en-us;English (United States)
It looks like there might also be some registry values we can pull from as well: http://windowsitpro.com/systems-management/where-registry-language-setting-each-user-stored which has 2 registry entries but I dont think we need to check them both because it appears to require a reboot to apply change? Sigh windows and its need to reboot for pretty much any change to the system.
Honestly I have no idea how we should go about it, someone with more windows chops should probably comment here...
Interesting, that looks promising.
Lets take this back into the issue to discuss this is too brittle imho.
Pull Request Checklist
Is this in reference to an existing issue?
Fixes for issue #16 and French.
General
Purpose
Make plugins compliants with Operating Systems configured in French. This also add a first sample to helper other users add supports for other locales (Spanish, Italian, etc.).