0.6.0 • Published 6 months ago

electron-packager-languages v0.6.0

Weekly downloads
460
License
MIT
Repository
github
Last release
6 months ago

Electron Packager Plugin: Languages

GitHub license Travis CI NPM Download Count Known Vulnerabilities

Reason

After packaging an Electron application, it contains all possible languages whether it supports or not. Then all those languages are listed e.g. at the App Store. The folders of unsupported languages should be removed in order to hide those languages at the detail page of the product.

Usage

Use the afterCopy hook in Electron Packager to run this plugin.

const setLanguages = require('electron-packager-languages');

electronPackager({
  ...
  afterCopy: [setLanguages(['en', 'en_GB'])]
})

Note that different platforms have different language/locale identifiers, e.g. Windows has en-GB while macOS has en_GB. See also issue #57.

In order to protect users from accidentally removing all languages from an app, there's an allowRemovingAll option that defaults to false. It can be overridden like this: setLanguages(['en', 'en_GB'], { allowRemoveAll: true }).

0.6.0

6 months ago

0.5.0

4 years ago

0.4.1

5 years ago

0.4.0

6 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.0

8 years ago