@shopify/translation-platform-utilities
v1.0.0
Published
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE.md) [![npm version](https://badge.fury.io/js/%40shopify%2Ftranslation-platform-utilities.svg)](https://badge.fury.io/js/%40shopify%2Ftranslation-platform-utilities.svg)
Downloads
15,482
Keywords
Readme
@shopify/translation-platform-utilities
Utilities for working with Shopify's translation platform configuration files.
Installation
$ yarn add @shopify/translation-platform-utilities
Usage
import {loadLocales} from '@shopify/translation-platform-utilities';
const locales = await loadLocales({
rootDirectory: this.rootPath,
});
locales.forEach((locale) => {
console.log(locale);
});
CLI Usage
In shopify-build with parallelism enabled , sewing-kit-locale
can be used to determine the locale for the current build job, e.g.:
$ yarn --silent shopify-build-locale
> en