How to use lcid - 8 common examples

To help you get started, we’ve selected a few lcid examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alan-ai / alan-sdk-reactnative / testtools / node_modules / os-locale / index.js View on Github external
.then(stdout => {
			const lcidCode = parseInt(stdout.replace('Locale', ''), 16);
			return lcid.from(lcidCode);
		});
}
github alan-ai / alan-sdk-reactnative / testtools / node_modules / os-locale / index.js View on Github external
function getWinLocaleSync() {
	const stdout = execa.sync('wmic', ['os', 'get', 'locale']).stdout;
	const lcidCode = parseInt(stdout.replace('Locale', ''), 16);
	return lcid.from(lcidCode);
}
github sx1989827 / DOClever / node_modules / yargs / node_modules / os-locale / index.js View on Github external
function getWinLocaleSync() {
	const stdout = execa.sync('wmic', ['os', 'get', 'locale']).stdout;
	const lcidCode = parseInt(stdout.replace('Locale', ''), 16);
	return lcid.from(lcidCode);
}
github sindresorhus / os-locale / index.js View on Github external
function getWinLocaleSync() {
	const {stdout} = execa.sync('wmic', ['os', 'get', 'locale']);
	const lcidCode = parseInt(stdout.replace('Locale', ''), 16);
	return lcid.from(lcidCode);
}
github GoogleContainerTools / kpt / docsy / node_modules / os-locale / index.js View on Github external
function getWinLocaleSync() {
	const {stdout} = execa.sync('wmic', ['os', 'get', 'locale']);
	const lcidCode = parseInt(stdout.replace('Locale', ''), 16);
	return lcid.from(lcidCode);
}
github sx1989827 / DOClever / node_modules / yargs / node_modules / os-locale / index.js View on Github external
.then(stdout => {
			const lcidCode = parseInt(stdout.replace('Locale', ''), 16);
			return lcid.from(lcidCode);
		});
}
github eschirtz / Computer-Science-Series / node_modules / webpack-dev-server / node_modules / os-locale / index.js View on Github external
childProcess.execFile('wmic', ['os', 'get', 'locale'], function (err, stdout) {
			if (err) {
				fallback();
				return;
			}

			var lcidCode = parseInt(stdout.replace('Locale', ''), 16);
			cache = lcid.from(lcidCode) || fallback();
			cb(null, cache);
		});
	} else {
github eschirtz / Computer-Science-Series / node_modules / webpack-dev-server / node_modules / os-locale / index.js View on Github external
if (cache || getEnvLocale() || !execFileSync || opts.spawn === false) {
		return cache;
	}

	if (process.platform === 'win32') {
		var stdout;

		try {
			stdout = execFileSync('wmic', ['os', 'get', 'locale'], {encoding: 'utf8'});
		} catch (err) {
			return fallback();
		}

		var lcidCode = parseInt(stdout.replace('Locale', ''), 16);
		cache = lcid.from(lcidCode) || fallback();
		return cache;
	}

	var res;

	try {
		res = parseLocale(execFileSync('locale', {encoding: 'utf8'}));
	} catch (err) {}

	if (!res && process.platform === 'darwin') {
		try {
			cache = execFileSync('defaults', ['read', '-g', 'AppleLocale'], {encoding: 'utf8'}).trim() || fallback();
			return cache;
		} catch (err) {
			return fallback();
		}

lcid

Mapping between standard locale identifiers and Windows locale identifiers (LCID)

MIT
Latest version published 7 months ago

Package Health Score

73 / 100
Full package analysis

Popular lcid functions