node-wifi icon indicating copy to clipboard operation
node-wifi copied to clipboard

[Feat]: Add language support

Open alexalannunes opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe.

I have an issue when I call wifi.getCurrentConnections return an empty array. I checked out the source code and found this image

I'm brazilian and console show sim | não :smile:

Describe the solution you'd like

this package cold be multi language

Describe alternatives you've considered

No response

Teachability, Documentation, Adoption, Migration Strategy

It'll be interesting set language to test the condition

if (fields[0] == 'yes')

like

wifi.setLanguage('pt-br');
// ...
const LANGUAGES = {
  PT_BR: "sim"
};
// ...
if (fields[0] == LANGUAGES[PT_BR]) { ... }

alexalannunes avatar May 24 '22 19:05 alexalannunes

Or check by process.env

image

alexalannunes avatar May 24 '22 19:05 alexalannunes