How to use the os-locale function in os-locale

To help you get started, we’ve selected a few os-locale 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 unfoldingWord / translationCore / src / js / actions / LocaleActions.js View on Github external
const setSystemLocale = (dispatch, languages, translations) => {
  return osLocale().then(locale => {
    console.log(`System Locale: ${locale}`);
    setActiveLanguageSafely(dispatch, locale, languages, translations);
  });
};
github marp-team / marp-cli / src / config.ts View on Github external
templateOption,
      themeSet,
      type,
      allowLocalFiles:
        this.args.allowLocalFiles ?? this.conf.allowLocalFiles ?? false,
      engine: this.engine.klass,
      globalDirectives: {
        description: this.args.description ?? this.conf.description,
        image: this.args.ogImage ?? this.conf.ogImage,
        theme: theme instanceof Theme ? theme.name : theme,
        title: this.args.title ?? this.conf.title,
        url: this.args.url ?? this.conf.url,
      },
      html: this.args.html ?? this.conf.html,
      jpegQuality: this.args.jpegQuality ?? this.conf.jpegQuality ?? 85,
      lang: this.conf.lang || (await osLocale()).replace(/@/g, '-'),
      options: this.conf.options || {},
      pages: !!(this.args.images || this.conf.images),
      watch: (this.args.watch ?? this.conf.watch) || preview || server || false,
    }
  }
github rung-tools / rung-cli / src / i18n.js View on Github external
export function getLocale() {
    const { RUNG_LOCALE } = process.env;
    return resolve(RUNG_LOCALE ? RUNG_LOCALE : osLocale());
}

os-locale

Get the system locale

MIT
Latest version published 2 years ago

Package Health Score

80 / 100
Full package analysis

Popular os-locale functions